@rh-support/troubleshoot 1.0.35 → 1.0.37
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/CaseInformation/CaseGroup.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseGroup.js +16 -3
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +19 -5
- package/package.json +2 -2
|
@@ -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;
|
|
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;AAWD,iBAAS,SAAS,CAAC,KAAK,EAAE,MAAM,eA4O/B;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -20,7 +20,14 @@ import { useCaseUpdateErrorMessage } from '../../hooks/useCaseUpdateErrorMessage
|
|
|
20
20
|
import { setCaseDetails, setSelectedCaseGroupUsers, updateCaseDetails } from '../../reducers/CaseReducer';
|
|
21
21
|
import { CaseValuesToWatch } from '../shared/Constants';
|
|
22
22
|
import { getChangedValueTooltip } from '../shared/utils';
|
|
23
|
-
const emptyCaseGroup = {
|
|
23
|
+
const emptyCaseGroup = {
|
|
24
|
+
groupNum: '',
|
|
25
|
+
name: '',
|
|
26
|
+
isPrivate: false,
|
|
27
|
+
isDefault: false,
|
|
28
|
+
defaultMembers: [],
|
|
29
|
+
members: [],
|
|
30
|
+
};
|
|
24
31
|
function CaseGroup(props) {
|
|
25
32
|
const { t } = useTranslation();
|
|
26
33
|
const caseUpdateError = useCaseUpdateErrorMessage();
|
|
@@ -45,7 +52,10 @@ function CaseGroup(props) {
|
|
|
45
52
|
const userPreferredFilter = () => __awaiter(this, void 0, void 0, function* () {
|
|
46
53
|
const fetchedDefaultGroupKey = yield getDefaultGroup();
|
|
47
54
|
const groupObj = ownersCaseGroups.data
|
|
48
|
-
? ownersCaseGroups.data.map((group) => ({
|
|
55
|
+
? ownersCaseGroups.data.map((group) => ({
|
|
56
|
+
value: group.name,
|
|
57
|
+
key: group.groupNum,
|
|
58
|
+
}))
|
|
49
59
|
: [];
|
|
50
60
|
if (!isEmpty(groupObj)) {
|
|
51
61
|
const preferredGroupObj = groupObj.find((group) => group.key === fetchedDefaultGroupKey);
|
|
@@ -123,7 +133,10 @@ function CaseGroup(props) {
|
|
|
123
133
|
if (isGroupMandatory) {
|
|
124
134
|
// having group selected for case is mandatory, make 'UnGrouped Case' option disabled
|
|
125
135
|
const listItems = list.map((item) => (Object.assign(Object.assign({}, item), { disabled: item.groupNum === '-1' })));
|
|
126
|
-
return toOptions(listItems, {
|
|
136
|
+
return toOptions(listItems, {
|
|
137
|
+
labelKey: 'name',
|
|
138
|
+
disabledKey: 'disabled',
|
|
139
|
+
});
|
|
127
140
|
}
|
|
128
141
|
else {
|
|
129
142
|
return toOptions(list, { labelKey: 'name' });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalTroubleshootEffects.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/GlobalTroubleshootEffects.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAWvD,OAAO,EAAqB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAQrF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"GlobalTroubleshootEffects.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/GlobalTroubleshootEffects.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAWvD,OAAO,EAAqB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAQrF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,eAuZtD"}
|
|
@@ -80,14 +80,20 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
80
80
|
const productFromUrl = parsedUrlParams.product || initialCaseState.caseDetails.product;
|
|
81
81
|
if (isEmpty(productFromUrl)) {
|
|
82
82
|
// Reset case state
|
|
83
|
-
setCaseDetails(caseDispatch, {
|
|
83
|
+
setCaseDetails(caseDispatch, {
|
|
84
|
+
product: productFromUrl,
|
|
85
|
+
version: undefined,
|
|
86
|
+
});
|
|
84
87
|
return;
|
|
85
88
|
}
|
|
86
89
|
const versionFromUrl = parsedUrlParams.version || initialCaseState.caseDetails.version;
|
|
87
90
|
const index = findIndex(allProducts.data.productsResult, (p) => p.product === productFromUrl);
|
|
88
91
|
if (index === -1) {
|
|
89
92
|
// invalid product, reset url
|
|
90
|
-
const newParams = {
|
|
93
|
+
const newParams = {
|
|
94
|
+
product: undefined,
|
|
95
|
+
version: undefined,
|
|
96
|
+
};
|
|
91
97
|
RouteUtils.updateQueryParams(props.routeProps, newParams);
|
|
92
98
|
}
|
|
93
99
|
else {
|
|
@@ -102,13 +108,19 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
102
108
|
// version is also valid
|
|
103
109
|
const versionToSet = isVersionFromURLValid ? versionFromUrl : undefined;
|
|
104
110
|
if (product !== productFromUrl || version !== versionToSet) {
|
|
105
|
-
setCaseDetails(caseDispatch, {
|
|
111
|
+
setCaseDetails(caseDispatch, {
|
|
112
|
+
product: productFromUrl,
|
|
113
|
+
version: versionToSet,
|
|
114
|
+
});
|
|
106
115
|
}
|
|
107
116
|
}
|
|
108
117
|
else if (!isMultiVersionProduct) {
|
|
109
118
|
// no version or invalid version and there is only 1 version we set default version in url that will trigger the flow with valid version this time
|
|
110
119
|
const defaultVersion = getVersionIfOnlyVersion(productVersions);
|
|
111
|
-
const newParams = {
|
|
120
|
+
const newParams = {
|
|
121
|
+
product: productFromUrl,
|
|
122
|
+
version: defaultVersion,
|
|
123
|
+
};
|
|
112
124
|
RouteUtils.updateQueryParams(props.routeProps, newParams);
|
|
113
125
|
}
|
|
114
126
|
}
|
|
@@ -249,7 +261,9 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
249
261
|
language,
|
|
250
262
|
accountNumber,
|
|
251
263
|
session_id: activeSessionId,
|
|
252
|
-
}, accountType: {
|
|
264
|
+
}, accountType: {
|
|
265
|
+
isSecure: selectedAccountDetails.data.securedEnvironment || false,
|
|
266
|
+
}, userType: { canAddAttachments }, fields: ['title', 'cta', 'description', 'rule_type', 'rule_sub_type', 'rule_id'] }, ((selectedLocalFiles === null || selectedLocalFiles === void 0 ? void 0 : selectedLocalFiles.length) && {
|
|
253
267
|
attachment: selectedLocalFiles.map((file) => ({
|
|
254
268
|
uuid: file.attachmentId,
|
|
255
269
|
fileName: file.name,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.37",
|
|
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": "4399821556d8466ddbfc02c44e3954047c9ae1e7"
|
|
146
146
|
}
|