@rh-support/troubleshoot 1.0.20 → 1.0.23
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/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +5 -5
- package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseGroup.js +11 -5
- package/package.json +7 -7
|
@@ -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' }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/CaseGroup.tsx"],"names":[],"mappings":"AAkBA,UAAU,MAAM;IACZ,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAID,iBAAS,SAAS,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"CaseGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/CaseGroup.tsx"],"names":[],"mappings":"AAkBA,UAAU,MAAM;IACZ,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAID,iBAAS,SAAS,CAAC,KAAK,EAAE,MAAM,eAmO/B;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -160,18 +160,24 @@ function CaseGroup(props) {
|
|
|
160
160
|
setCaseGroupInvalid(true);
|
|
161
161
|
}
|
|
162
162
|
}, [isGroupMandatory, groupNumber, ownersCaseGroups, caseNumber, groupName]);
|
|
163
|
-
const onCaseGroupClear = () => {
|
|
164
|
-
|
|
165
|
-
|
|
163
|
+
const onCaseGroupClear = () => __awaiter(this, void 0, void 0, function* () {
|
|
164
|
+
try {
|
|
165
|
+
yield onCaseGroupChange(toOption(emptyCaseGroup));
|
|
166
|
+
setSelectedCaseGroup(emptyCaseGroup);
|
|
167
|
+
}
|
|
168
|
+
catch (error) {
|
|
169
|
+
console.log(error);
|
|
170
|
+
}
|
|
171
|
+
});
|
|
166
172
|
return (React.createElement("div", { className: "form-group" },
|
|
167
173
|
React.createElement("label", { htmlFor: "open-case-folder" },
|
|
168
174
|
React.createElement(Trans, null, "Group"),
|
|
169
175
|
React.createElement(ValueChangedIcon, { afterLocalChange: afterGroupLocalChange, comparator: groupComparator, isLocalChange: localGroupChange, value: selectedCaseGroup, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.group, (v) => v.name) }),
|
|
170
176
|
isGroupMandatory && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))),
|
|
171
|
-
React.createElement(Dropdown, { id: "open-case-folder", searchable: (ownersCaseGroups.data || []).length > 10, onClearSelection: onCaseGroupClear, name: "open-case-folder", placeholder: t(`Select a group`), title: t(`Select a group`), list: computeDropdownList(), selectedItem: toOption(selectedCaseGroup, { labelKey: 'name' }), disabled: ownersCaseGroups.isError || ownersCaseGroups.isFetching || isCaseGroupUpdating, isLoadingList: ownersCaseGroups.isFetching || isCaseGroupUpdating, onChange: onCaseGroupChange, isInValid: ownersCaseGroups.isError || isCaseGroupInvalid || isSelectedUngroupedInvalid, required: isGroupMandatory, onOuterClick: onOuterClickGroupCheck, "data-tracking-id": "open-case-folder" }),
|
|
177
|
+
React.createElement(Dropdown, { id: "open-case-folder", searchable: (ownersCaseGroups.data || []).length > 10, onClearSelection: onCaseGroupClear, name: "open-case-folder", placeholder: t(`Select a group`), title: t(`Select a group`), list: computeDropdownList(), selectedItem: toOption(selectedCaseGroup, { labelKey: 'name' }), disabled: ownersCaseGroups.isError || ownersCaseGroups.isFetching || isCaseGroupUpdating, isLoadingList: ownersCaseGroups.isFetching || isCaseGroupUpdating, onChange: onCaseGroupChange, isInValid: (ownersCaseGroups.isError || isCaseGroupInvalid || isSelectedUngroupedInvalid) && isGroupMandatory, required: isGroupMandatory, onOuterClick: onOuterClickGroupCheck, "data-tracking-id": "open-case-folder" }),
|
|
172
178
|
isSelectedUngroupedInvalid && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
173
179
|
React.createElement(Trans, null, "'Ungrouped Case' cannot be selected. Please select a group."))),
|
|
174
|
-
isCaseGroupInvalid && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
180
|
+
isCaseGroupInvalid && isGroupMandatory && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
175
181
|
React.createElement(Trans, null, "Case group cannot be empty.")))));
|
|
176
182
|
}
|
|
177
183
|
export default CaseGroup;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.23",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"@patternfly/patternfly": "4.196.7",
|
|
32
32
|
"@patternfly/pfe-accordion": "1.12.3",
|
|
33
33
|
"@patternfly/pfe-collapse": "1.12.3",
|
|
34
|
-
"@patternfly/pfe-cta": "
|
|
34
|
+
"@patternfly/pfe-cta": "1.12.3",
|
|
35
35
|
"@patternfly/pfe-tabs": "1.12.3",
|
|
36
|
-
"@patternfly/react-core": "4.
|
|
36
|
+
"@patternfly/react-core": "4.264.0",
|
|
37
37
|
"@rh-support/components": "^0.1.3",
|
|
38
38
|
"@rh-support/react-context": "^0.1.3",
|
|
39
39
|
"@rh-support/types": "^0.1.3",
|
|
@@ -70,11 +70,11 @@
|
|
|
70
70
|
"@patternfly/pfe-collapse": "1.12.3",
|
|
71
71
|
"@patternfly/pfe-icon": "^1.12.3",
|
|
72
72
|
"@patternfly/pfe-tabs": "1.12.3",
|
|
73
|
-
"@patternfly/react-core": "4.
|
|
73
|
+
"@patternfly/react-core": "4.264.0",
|
|
74
74
|
"@progress/kendo-drawing": "^1.6.0",
|
|
75
75
|
"@progress/kendo-react-pdf": "^3.12.0",
|
|
76
|
-
"@rh-support/components": "1.2.
|
|
77
|
-
"@rh-support/react-context": "1.0.
|
|
76
|
+
"@rh-support/components": "1.2.11",
|
|
77
|
+
"@rh-support/react-context": "1.0.12",
|
|
78
78
|
"@rh-support/types": "0.2.0",
|
|
79
79
|
"@rh-support/user-permissions": "1.0.9",
|
|
80
80
|
"@rh-support/utils": "1.0.7",
|
|
@@ -142,5 +142,5 @@
|
|
|
142
142
|
"not ie <= 11",
|
|
143
143
|
"not op_mini all"
|
|
144
144
|
],
|
|
145
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "361b4d05273169e7c9b7f5c5236ccd7ce1463499"
|
|
146
146
|
}
|