@rh-support/manage 2.1.112 → 2.1.114
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/Groups/GroupSelect/GroupSelect.d.ts.map +1 -1
- package/lib/esm/components/Groups/GroupSelect/GroupSelect.js +8 -3
- package/lib/esm/components/ManagePreferences/sections/PreferencesCaseCreate.d.ts.map +1 -1
- package/lib/esm/components/ManagePreferences/sections/PreferencesCaseCreate.js +11 -1
- package/lib/esm/scss/_pf-overrides.scss +4 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupSelect.d.ts","sourceRoot":"","sources":["../../../../../src/components/Groups/GroupSelect/GroupSelect.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AA4B3E,OAAO,KAAmD,MAAM,OAAO,CAAC;AAKxE,UAAU,MAAM;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;CAChD;AAKD,eAAO,MAAM,WAAW,UAAW,MAAM,
|
|
1
|
+
{"version":3,"file":"GroupSelect.d.ts","sourceRoot":"","sources":["../../../../../src/components/Groups/GroupSelect/GroupSelect.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AA4B3E,OAAO,KAAmD,MAAM,OAAO,CAAC;AAKxE,UAAU,MAAM;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;CAChD;AAKD,eAAO,MAAM,WAAW,UAAW,MAAM,sBAycxC,CAAC"}
|
|
@@ -36,13 +36,18 @@ export const GroupSelect = (props) => {
|
|
|
36
36
|
const confirmation = useConfirmation();
|
|
37
37
|
// Fetch groups on init
|
|
38
38
|
useEffect(() => {
|
|
39
|
-
var _a;
|
|
39
|
+
var _a, _b;
|
|
40
40
|
if (haventLoadedMetadata(caseGroups, (data) => data === undefined))
|
|
41
41
|
fetchCaseGroupsForSSO(dispatch, loggedInUserJwtToken.username);
|
|
42
42
|
if (isEmpty(selectedGroup) && !isEmpty(caseGroups) && ((_a = caseGroups === null || caseGroups === void 0 ? void 0 : caseGroups.data) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
43
43
|
const defaultCaseGroup = find(caseGroups === null || caseGroups === void 0 ? void 0 : caseGroups.data, (g) => g.isDefault);
|
|
44
|
-
const
|
|
45
|
-
|
|
44
|
+
const newSelectedGroup = (defaultCaseGroup === null || defaultCaseGroup === void 0 ? void 0 : defaultCaseGroup.groupNum) === '-1'
|
|
45
|
+
? null
|
|
46
|
+
: (defaultCaseGroup === null || defaultCaseGroup === void 0 ? void 0 : defaultCaseGroup.name) ||
|
|
47
|
+
(((_b = caseGroups.data[0]) === null || _b === void 0 ? void 0 : _b.groupNum) !== '-1' ? caseGroups.data[0].name : null);
|
|
48
|
+
if (newSelectedGroup !== selectedGroup) {
|
|
49
|
+
setSelectedGroup(newSelectedGroup);
|
|
50
|
+
}
|
|
46
51
|
}
|
|
47
52
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
48
53
|
}, [dispatch, loggedInUserJwtToken, caseGroups]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreferencesCaseCreate.d.ts","sourceRoot":"","sources":["../../../../../src/components/ManagePreferences/sections/PreferencesCaseCreate.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PreferencesCaseCreate.d.ts","sourceRoot":"","sources":["../../../../../src/components/ManagePreferences/sections/PreferencesCaseCreate.tsx"],"names":[],"mappings":"AAeA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAO/D,UAAU,MAAM;CAAG;AACnB,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,qBA0MlD"}
|
|
@@ -11,7 +11,7 @@ import { publicApi } from '@cee-eng/hydrajs';
|
|
|
11
11
|
import { Card, CardBody, CardHeader } from '@patternfly/react-core';
|
|
12
12
|
import { SelectOption } from '@patternfly/react-core/deprecated';
|
|
13
13
|
import { ToastNotification, useFetch } from '@rh-support/components';
|
|
14
|
-
import { fetchLanguageMetadata, GlobalMetadataDispatchContext, GlobalMetadataStateContext, } from '@rh-support/react-context';
|
|
14
|
+
import { fetchLanguageMetadata, GlobalMetadataDispatchContext, GlobalMetadataReducerConstants, GlobalMetadataStateContext, } from '@rh-support/react-context';
|
|
15
15
|
import { haventLoadedMetadata, PreferredLanguages } from '@rh-support/utils';
|
|
16
16
|
import isEmpty from 'lodash/isEmpty';
|
|
17
17
|
import map from 'lodash/map';
|
|
@@ -49,8 +49,18 @@ export function PreferencesCaseCreate(props) {
|
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
const updateDefaultGroupPref = (groupNum) => __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
var _a;
|
|
52
53
|
try {
|
|
53
54
|
yield toggleDefaultGroupFetch.request(groupNum, loggedInUserRights.data.getSSOUsername(), true, loggedInUsersAccount.data.secureSupport);
|
|
55
|
+
const updatedGroups = (caseGroups.data || []).map((group) => (Object.assign(Object.assign({}, group), { isDefault: group.groupNum === groupNum })));
|
|
56
|
+
dispatchToGlobalMetadataReducer({
|
|
57
|
+
type: GlobalMetadataReducerConstants.setCaseGroups,
|
|
58
|
+
payload: {
|
|
59
|
+
caseGroups: Object.assign(Object.assign({}, caseGroups), { data: updatedGroups }),
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
setUserDefaultGroupList(updatedGroups);
|
|
63
|
+
setOriginalDefaultGroup(((_a = updatedGroups.find((g) => g.isDefault)) === null || _a === void 0 ? void 0 : _a.name) || 'Ungrouped Case');
|
|
54
64
|
}
|
|
55
65
|
catch (error) {
|
|
56
66
|
console.log(error);
|
|
@@ -148,6 +148,10 @@ div.pf-v5-c-pagination__nav-page-select {
|
|
|
148
148
|
border-bottom: 1px solid black;
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
+
.pf-v5-c-form-control.pf-m-disabled.issue-title-disabled {
|
|
152
|
+
border: none !important;
|
|
153
|
+
}
|
|
154
|
+
|
|
151
155
|
.pf-v5-c-chip {
|
|
152
156
|
.pf-v5-svg {
|
|
153
157
|
font-size: 12px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/manage",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.114",
|
|
4
4
|
"description": "Customer Support Manage App",
|
|
5
5
|
"author": "Jordan Eudy <jeudy100@gmail.com>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"defaults and supports es6-module",
|
|
104
104
|
"maintained node versions"
|
|
105
105
|
],
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "5e1a8d7c92efc0ddfec4cb6fb40c09d55197ea29"
|
|
107
107
|
}
|