@rh-support/troubleshoot 1.0.20 → 1.0.22
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductVersion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/ProductVersion.tsx"],"names":[],"mappings":"AA4BA,UAAU,MAAM;IACZ,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACvC;AAYD,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ProductVersion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/ProductVersion.tsx"],"names":[],"mappings":"AA4BA,UAAU,MAAM;IACZ,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACvC;AAYD,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,eAgRrC;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -19,7 +19,7 @@ import React, { useContext, useEffect, useMemo, useState } from 'react';
|
|
|
19
19
|
import { Trans, useTranslation } from 'react-i18next';
|
|
20
20
|
import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
|
|
21
21
|
import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
|
|
22
|
-
import { getVersionsDetails,
|
|
22
|
+
import { getVersionsDetails, updateCaseDetails } from '../../../../reducers/CaseReducer';
|
|
23
23
|
const getVersions = (products, product) => {
|
|
24
24
|
const allProductsIndex = findIndex(products, (p) => p.product === product);
|
|
25
25
|
return allProductsIndex !== -1 ? products[allProductsIndex].versions || [] : [];
|
|
@@ -80,6 +80,8 @@ function ProductNVersion(props) {
|
|
|
80
80
|
setSelectedProductLocal(product);
|
|
81
81
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
82
82
|
}, [allProducts, product, dispatchToGlobalMetadataReducer, contactSSOName]);
|
|
83
|
+
let previousProduct = usePrevious(selectedProductLocal);
|
|
84
|
+
let previousVersion = usePrevious(selectedVersionLocal);
|
|
83
85
|
const onProductChange = (option) => __awaiter(this, void 0, void 0, function* () {
|
|
84
86
|
var _a, _b, _c;
|
|
85
87
|
if (canEditCase.alert())
|
|
@@ -119,13 +121,12 @@ function ProductNVersion(props) {
|
|
|
119
121
|
yield getVersionsDetails(caseDispatch, option.value.product);
|
|
120
122
|
}
|
|
121
123
|
catch (e) {
|
|
122
|
-
setSelectedProductLocal(
|
|
123
|
-
setSelectedVersionLocal(
|
|
124
|
+
setSelectedProductLocal(previousProduct);
|
|
125
|
+
setSelectedVersionLocal(previousVersion);
|
|
124
126
|
}
|
|
125
127
|
setIsVersionUpdating(false);
|
|
126
128
|
}
|
|
127
129
|
});
|
|
128
|
-
let previousProduct = usePrevious(selectedProductLocal);
|
|
129
130
|
const onVersionChange = (option) => __awaiter(this, void 0, void 0, function* () {
|
|
130
131
|
if (canEditCase.alert())
|
|
131
132
|
return;
|
|
@@ -183,7 +184,6 @@ function ProductNVersion(props) {
|
|
|
183
184
|
isTopProduct: false,
|
|
184
185
|
isEntitledProduct: true,
|
|
185
186
|
};
|
|
186
|
-
setCaseDetails(caseDispatch, { product: '', version: '' });
|
|
187
187
|
setIsProductInvalid(true);
|
|
188
188
|
setIsVersionInvalid(true);
|
|
189
189
|
onProductChange(toOption(defaultSelectedProduct, { labelKey: 'product' }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.22",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -142,5 +142,5 @@
|
|
|
142
142
|
"not ie <= 11",
|
|
143
143
|
"not op_mini all"
|
|
144
144
|
],
|
|
145
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "5349c13c4337d4ae9fab27e30979981bb9708541"
|
|
146
146
|
}
|