@rh-support/troubleshoot 2.2.27 → 2.2.29
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/RequestRemoteSession/ESSRemoteSession.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.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 +30 -18
- 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 +38 -47
- 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/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 +13 -4
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ESSRemoteSession.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAOxE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,sBAAsB,EAAE,OAAO,CAAC;IAChC,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACrC;AAED,eAAO,MAAM,gBAAgB,+
|
|
1
|
+
{"version":3,"file":"ESSRemoteSession.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAOxE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,sBAAsB,EAAE,OAAO,CAAC;IAChC,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACrC;AAED,eAAO,MAAM,gBAAgB,+EAkH3B,CAAC"}
|
|
@@ -41,7 +41,7 @@ export const ESSRemoteSession = forwardRef((props, ref) => {
|
|
|
41
41
|
React.createElement("li", null, t('Agreed upon by both Red Hat and you, the end user'))),
|
|
42
42
|
React.createElement("p", { className: "rrs-light-grey-text" }, t('Red Hat will add a comment to your case to schedule your remote session.')),
|
|
43
43
|
screenSessionRequested && (React.createElement(Tooltip, { content: t('Remote session agreement has already been accepted.'), reference: tooltipRef, "aria-live": 'polite' })),
|
|
44
|
-
React.createElement(Button, { "aria-label": screenSessionRequested ? t('Remote session requested') : t('Request remote session'), variant: screenSessionRequested ? 'primary' : 'secondary', onClick: termsAcked ? toggleESSRemoteSessionModal : toggleNewESSRemoteSessionModal, "data-tracking-id": "accept-remote-session-agreement-trigger", isAriaDisabled: screenSessionRequested, ref: tooltipRef
|
|
44
|
+
React.createElement(Button, { "aria-label": screenSessionRequested ? t('Remote session requested') : t('Request remote session'), variant: screenSessionRequested ? 'primary' : 'secondary', onClick: termsAcked ? toggleESSRemoteSessionModal : toggleNewESSRemoteSessionModal, "data-tracking-id": "accept-remote-session-agreement-trigger", isAriaDisabled: screenSessionRequested, ref: tooltipRef }, screenSessionRequested ? t('Remote session requested') : t('Request remote session')))));
|
|
45
45
|
return (React.createElement(React.Fragment, null,
|
|
46
46
|
ESSRemoteSessionSectionBody,
|
|
47
47
|
remoteSessionTermsAcked && !screenSessionRequested ? (React.createElement(ESSRemoteSessionModal, { caseNumber: caseNumber, caseStatus: caseStatus, screenSessionRequested: screenSessionRequested, show: openESSRemoteSessionModal, onClose: toggleESSRemoteSessionModal, loggedInUser: loggedInUser.data.ssoUsername === undefined ? '' : loggedInUser.data.ssoUsername, loggedInUserRights: loggedInUserRights, readOnly: readOnly })) : (React.createElement(NewEssTermsModal, { caseNumber: caseNumber, caseStatus: caseStatus, show: openNewESSRemoteSessionModal, onClose: toggleNewESSRemoteSessionModal, siteCode: TnC.REMOTE_RIDER_SITE_CODE, eventCode: TnC.REMOTER_RIDER_EVENT_CODE, loggedInUser: loggedInUser.data.ssoUsername === undefined ? '' : loggedInUser.data.ssoUsername, loggedInUserRights: loggedInUserRights, readOnly: readOnly }))));
|
|
@@ -141,7 +141,7 @@ export function CaseContactPhoneNumber() {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
else {
|
|
144
|
-
setLocalFullPhoneState(phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber);
|
|
144
|
+
setLocalFullPhoneState((phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber).trim());
|
|
145
145
|
setIsShowOldPhone(false);
|
|
146
146
|
}
|
|
147
147
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -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,eAwPrC;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,39 @@ 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
|
+
setVersions(productObj.versions);
|
|
141
|
+
if (productObj.versions.length === 1 && !selectedVersionLocal) {
|
|
142
|
+
setSelectedVersionLocal(productObj.versions[0]);
|
|
143
|
+
updateProductVerstion(selectedProductLocal, productObj.versions[0]);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
setIsSEProductApiIsDown(true);
|
|
148
|
+
}
|
|
149
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
143
150
|
}, [selectedProductLocal, caseDispatch, allProducts.data]);
|
|
144
151
|
// observe when fetched versions are available
|
|
145
152
|
useEffect(() => {
|
|
153
|
+
if (!isSEProductApiIsDown)
|
|
154
|
+
return;
|
|
146
155
|
const fetchedVersions = versionsDetails.data.map(({ name }) => name);
|
|
147
156
|
if (fetchedVersions.length === 1 && !selectedVersionLocal) {
|
|
148
157
|
setVersions(fetchedVersions);
|
|
@@ -152,7 +161,10 @@ function ProductNVersion(props) {
|
|
|
152
161
|
}
|
|
153
162
|
const productObj = getProductObj(allProducts.data.productsResult, selectedProductLocal);
|
|
154
163
|
const sfdcVersions = getUniqueSortedVersions(fetchedVersions);
|
|
155
|
-
const
|
|
164
|
+
const versionsForSelectedProduct = productObj.versions ? productObj.versions : sfdcVersions;
|
|
165
|
+
const productVersions = (productObj === null || productObj === void 0 ? void 0 : productObj.hasComponentsInsteadOfVersions)
|
|
166
|
+
? versionsForSelectedProduct.reverse()
|
|
167
|
+
: versionsForSelectedProduct;
|
|
156
168
|
setVersions(productVersions);
|
|
157
169
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
158
170
|
}, [versionsDetails.data]);
|
|
@@ -174,6 +186,6 @@ function ProductNVersion(props) {
|
|
|
174
186
|
React.createElement("div", { className: "version-selector-wrapper" },
|
|
175
187
|
React.createElement("label", { htmlFor: "version-dropdown" },
|
|
176
188
|
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" }))))));
|
|
189
|
+
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
190
|
}
|
|
179
191
|
export default ProductNVersion;
|
|
@@ -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,gBAqItD,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,51 @@ 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
|
-
const productObj = getProductObj(allProducts.data.productsResult, props.selectedProduct.name);
|
|
55
|
-
const versionArray = productObj.versions.map((version, index) => (React.createElement(SelectOption, { key: index, value: version })));
|
|
56
|
-
setSelectVersionOptions(versionArray);
|
|
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
|
+
// 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]);
|
|
58
37
|
}
|
|
59
38
|
else {
|
|
60
|
-
|
|
39
|
+
setSelected('');
|
|
61
40
|
}
|
|
62
|
-
|
|
41
|
+
const versionArray = props.selectedProduct.versions.map((version, index) => (React.createElement(SelectOption, { key: index, value: version })));
|
|
42
|
+
setSelectVersionOptions(versionArray);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
setSelected('');
|
|
46
|
+
setIsSEProductApiIsDown(true);
|
|
47
|
+
}
|
|
48
|
+
const getVersions = () => getVersionsDetails(caseDispatch, props.selectedProduct.name);
|
|
49
|
+
// call sfdc version api version flags that is used in severity and submit components
|
|
63
50
|
getVersions();
|
|
64
51
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
65
52
|
}, [props.selectedProduct]);
|
|
53
|
+
// We have version that comes from url
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
if (!props.selectedProduct.name)
|
|
56
|
+
return;
|
|
57
|
+
const productObj = getProductObj(allProducts.data.productsResult, props.selectedProduct.name);
|
|
58
|
+
if (productObj.versions) {
|
|
59
|
+
const versionArray = productObj.versions.map((version, index) => (React.createElement(SelectOption, { key: index, value: version })));
|
|
60
|
+
setSelectVersionOptions(versionArray);
|
|
61
|
+
setSelected(props.versionState);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
setIsSEProductApiIsDown(true);
|
|
65
|
+
}
|
|
66
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
67
|
+
}, [props.versionState]);
|
|
66
68
|
// observe when fetched versions are available
|
|
67
69
|
useEffect(() => {
|
|
70
|
+
if (!isSEProductApiIsDown)
|
|
71
|
+
return;
|
|
68
72
|
const fetchedVersions = versionsDetails.data.map(({ name }) => name);
|
|
69
73
|
// if versions array has one value set that value as selected
|
|
70
74
|
if (fetchedVersions.length === 1) {
|
|
@@ -77,7 +81,7 @@ export const NewProductVersionSelector = (props) => {
|
|
|
77
81
|
const versionArray = productVersions.map((version, index) => (React.createElement(SelectOption, { key: index, value: version })));
|
|
78
82
|
setSelectVersionOptions(versionArray);
|
|
79
83
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
80
|
-
}, [versionsDetails.data]);
|
|
84
|
+
}, [versionsDetails.data, isSEProductApiIsDown]);
|
|
81
85
|
let options = [React.createElement(SelectGroup, { key: "productVersions" }), ...selectVersionOptions];
|
|
82
86
|
const onToggle = (isOpen) => {
|
|
83
87
|
setIsOpen(isOpen);
|
|
@@ -87,19 +91,6 @@ export const NewProductVersionSelector = (props) => {
|
|
|
87
91
|
setSelected(selection);
|
|
88
92
|
setIsOpen(false);
|
|
89
93
|
};
|
|
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
94
|
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.
|
|
95
|
+
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
96
|
};
|
|
@@ -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 +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":"
|
|
1
|
+
{"version":3,"file":"SubmitCase.d.ts","sourceRoot":"","sources":["../../../../src/components/SubmitCase/SubmitCase.tsx"],"names":[],"mappings":"AAkCA,MAAM,CAAC,OAAO,UAAU,UAAU,gBAiTjC"}
|
|
@@ -2,8 +2,8 @@ import { Env, publicApi } from '@cee-eng/hydrajs';
|
|
|
2
2
|
import { ActionList, ActionListItem, Button, Text, TextVariants, Tooltip } from '@patternfly/react-core';
|
|
3
3
|
import CheckCircleIcon from '@patternfly/react-icons/dist/js/icons/check-circle-icon';
|
|
4
4
|
import { AlertMessage, AlertType, useFetch } from '@rh-support/components';
|
|
5
|
-
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
6
|
-
import { getConfigField, getRedhatDotComHost, PCM_CONFIG_FIELD_TYPE, PreviousCaseTypes } from '@rh-support/utils';
|
|
5
|
+
import { GlobalMetadataStateContext, useGlobalStateContext } from '@rh-support/react-context';
|
|
6
|
+
import { getConfigField, getRedhatDotComHost, isSpecialSupportOfferingEnabled, PCM_CONFIG_FIELD_TYPE, PreviousCaseTypes, } from '@rh-support/utils';
|
|
7
7
|
import find from 'lodash/find';
|
|
8
8
|
import isEmpty from 'lodash/isEmpty';
|
|
9
9
|
import isEqual from 'lodash/isEqual';
|
|
@@ -25,7 +25,8 @@ import { isUploadedAndAnalyzed, isUploadingAttachment } from '../shared/fileUplo
|
|
|
25
25
|
import { AttachmentStateContext } from '../shared/fileUpload/reducer/AttachmentReducerContext';
|
|
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, screenSessionRequested, } = useCaseSelector((state) => ({
|
|
29
30
|
entitlementSla: state.caseDetails.entitlementSla,
|
|
30
31
|
severity: state.caseDetails.severity,
|
|
31
32
|
caseNumber: state.caseDetails.caseNumber,
|
|
@@ -37,6 +38,8 @@ export default function SubmitCase() {
|
|
|
37
38
|
caseCreationError: state.caseCreationError,
|
|
38
39
|
caseCreationErrorMessage: state.caseCreationErrorMessage,
|
|
39
40
|
selectedAccountDetails: state.selectedAccountDetails,
|
|
41
|
+
product: state.caseDetails.product,
|
|
42
|
+
screenSessionRequested: state.caseDetails.screenSessionRequested,
|
|
40
43
|
}), isEqual);
|
|
41
44
|
const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
|
|
42
45
|
const { topContentState: { topContent }, } = useContext(TCStateContext);
|
|
@@ -47,6 +50,7 @@ export default function SubmitCase() {
|
|
|
47
50
|
const { globalMetadataState: { loggedInUser, loggedInUsersAccount, pcmConfig }, } = useContext(GlobalMetadataStateContext);
|
|
48
51
|
const getBusinessHours = useFetch(publicApi.businessHours.getBusinessHours);
|
|
49
52
|
const { t } = useTranslation();
|
|
53
|
+
const { globalMetadataState: { allProducts }, } = useGlobalStateContext();
|
|
50
54
|
const showRemoteRiderTermsInline = getConfigField(pcmConfig.data, 'showInlineRemoteRiderTerms', PCM_CONFIG_FIELD_TYPE.FEATURE_FLAG);
|
|
51
55
|
const getCaseURL = () => {
|
|
52
56
|
return `/support/cases/#/case/${caseNumber}`;
|
|
@@ -81,12 +85,17 @@ export default function SubmitCase() {
|
|
|
81
85
|
? false
|
|
82
86
|
: attachmentState.caseFiles.selectedLocalFiles.every((localFile) => !isUploadedAndAnalyzed(localFile));
|
|
83
87
|
const isNotAnIdea = caseType !== PreviousCaseTypes.FEATURE_ENHANCEMENT;
|
|
88
|
+
// To check if the user is ESS Customer and Product has ESS Support
|
|
89
|
+
const isESSCustomer = isSpecialSupportOfferingEnabled((_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult, product);
|
|
84
90
|
return (React.createElement("article", { className: "gird-main" },
|
|
85
91
|
React.createElement(AlertMessage, { className: "pf-u-mt-lg", title: t('Failed to add user.'), variant: AlertType.DANGER, show: addNotifiedUserError }),
|
|
86
92
|
React.createElement(AlertMessage, { className: "pf-u-mt-lg", variant: AlertType.DANGER, show: caseCreationError, title: t("Sorry, we're experiencing an error"), isInline: true },
|
|
87
93
|
React.createElement(React.Fragment, null, caseCreationErrorMessage)),
|
|
88
94
|
!isCreatingCase && !caseCreationError && (React.createElement(React.Fragment, null,
|
|
89
|
-
|
|
95
|
+
!isESSCustomer &&
|
|
96
|
+
!screenSessionRequested &&
|
|
97
|
+
showRemoteRiderBanner &&
|
|
98
|
+
!loggedInUser.data.isInternal && (React.createElement(RemoteRiderBanner, { onConfirm: onRemoteRiderConfirm, onClose: onRemoteRiderClose, caseNumber: caseNumber, isSecureSupport: loggedInUsersAccount.data.secureSupport })),
|
|
90
99
|
React.createElement("div", { className: "submit-case-header-container" },
|
|
91
100
|
React.createElement("p", { className: "kicker kicker-sm pf-u-mb-sm" }, !isEmpty(RouteUtils.seBasePath) &&
|
|
92
101
|
!isUploadingAttachment(attachmentState.caseFiles.selectedLocalFiles) ? (React.createElement(React.Fragment, null,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.29",
|
|
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.17",
|
|
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.17",
|
|
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.16",
|
|
70
|
+
"@rh-support/react-context": "2.1.16",
|
|
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.10",
|
|
73
|
+
"@rh-support/utils": "2.1.7",
|
|
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": "16b7fff6899cdf8d7011becba0351d66ee723f90"
|
|
137
137
|
}
|