@rh-support/troubleshoot 1.0.37 → 1.0.38
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/Case.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Case.js +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +1 -1
- package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseGroup.js +1 -32
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Case.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/Case.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAS,mBAAmB,EAAiD,MAAM,kBAAkB,CAAC;AAmB7G,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Case.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/Case.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAS,mBAAmB,EAAiD,MAAM,kBAAkB,CAAC;AAmB7G,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,MAAM,eAuLzC"}
|
|
@@ -114,7 +114,7 @@ export default function Case(props) {
|
|
|
114
114
|
canReadCase &&
|
|
115
115
|
(!isFetchingCaseDetails || !isEmpty(product)) &&
|
|
116
116
|
!isFetchingCaseDetailsError && (React.createElement(React.Fragment, null,
|
|
117
|
-
React.createElement(ErrorBoundary,
|
|
117
|
+
React.createElement(ErrorBoundary, { errorMsgInfo: t('There was an error loading cases. Please try refreshing the page.') },
|
|
118
118
|
React.createElement(CaseOverview, { caseNumber: caseNumber })),
|
|
119
119
|
React.createElement(Switch, null,
|
|
120
120
|
React.createElement(Route, { path: `${path}/:activeTab?` },
|
|
@@ -196,7 +196,7 @@ export function CaseDetailsAside(props) {
|
|
|
196
196
|
React.createElement(Checkbox, { label: t('Set to default'), isChecked: isDefaultBoxChecked, onChange: onDefaultCheckboxChange, id: "set-default-view-checkbox", name: "default-view-checkbox", isDisabled: isDefaultBoxChecked, className: 'defaultViewCheckbox' })))),
|
|
197
197
|
React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading top solutions') } },
|
|
198
198
|
React.createElement(CaseSolutions, { caseNumber: caseNumber, ref: topSolutionsRef, isSecureSupportAccount: isSecureSupportAccount })),
|
|
199
|
-
!caseEscalations.isFetching && canViewACESection && (React.createElement(ErrorBoundary,
|
|
199
|
+
!caseEscalations.isFetching && canViewACESection && (React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading customer escalation') } },
|
|
200
200
|
React.createElement(ActiveCustomerEscalation, { caseNumber: caseNumber, caseSeverity: severity, caseStatus: status, ref: createEscalationRef }))),
|
|
201
201
|
isExternal && (React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading remote session agreement') } },
|
|
202
202
|
React.createElement(RemoteSessionAgreement, { caseNumber: caseNumber, caseSeverity: severity, caseStatus: status, ref: createEscalationRef, acceptedRemoteSessionTerms: acceptedRemoteSessionTerms, readOnly: canReadCase })))))));
|
|
@@ -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;AAWD,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;AAWD,iBAAS,SAAS,CAAC,KAAK,EAAE,MAAM,eAsM/B;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { Dropdown, ToastNotification, ValueChangedIcon } from '@rh-support/components';
|
|
11
|
-
import { GlobalMetadataStateContext, useCanEditCase
|
|
11
|
+
import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
|
|
12
12
|
import { toOption, toOptions } from '@rh-support/utils';
|
|
13
13
|
import find from 'lodash/find';
|
|
14
14
|
import isEmpty from 'lodash/isEmpty';
|
|
@@ -46,37 +46,6 @@ function CaseGroup(props) {
|
|
|
46
46
|
const [isCaseGroupUpdating, setCaseGroupUpdating] = useState(false);
|
|
47
47
|
const canEditCase = useCanEditCase();
|
|
48
48
|
const { globalMetadataState: { loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
49
|
-
const { getDefaultGroup } = useUserPreferences();
|
|
50
|
-
// when user opens a case, sets group to the default group saved in preferences
|
|
51
|
-
useEffect(() => {
|
|
52
|
-
const userPreferredFilter = () => __awaiter(this, void 0, void 0, function* () {
|
|
53
|
-
const fetchedDefaultGroupKey = yield getDefaultGroup();
|
|
54
|
-
const groupObj = ownersCaseGroups.data
|
|
55
|
-
? ownersCaseGroups.data.map((group) => ({
|
|
56
|
-
value: group.name,
|
|
57
|
-
key: group.groupNum,
|
|
58
|
-
}))
|
|
59
|
-
: [];
|
|
60
|
-
if (!isEmpty(groupObj)) {
|
|
61
|
-
const preferredGroupObj = groupObj.find((group) => group.key === fetchedDefaultGroupKey);
|
|
62
|
-
if (preferredGroupObj === null || preferredGroupObj === void 0 ? void 0 : preferredGroupObj.value) {
|
|
63
|
-
const parsedFetchedDefaultGroup = {
|
|
64
|
-
groupNum: preferredGroupObj.key,
|
|
65
|
-
name: preferredGroupObj.value,
|
|
66
|
-
isPrivate: false,
|
|
67
|
-
isDefault: false,
|
|
68
|
-
defaultMembers: [],
|
|
69
|
-
members: [],
|
|
70
|
-
};
|
|
71
|
-
groupNumber === '-1' &&
|
|
72
|
-
props.init &&
|
|
73
|
-
onCaseGroupChange(toOption(parsedFetchedDefaultGroup, { labelKey: 'name' }));
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
isEmpty(caseNumber) && userPreferredFilter();
|
|
78
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
79
|
-
}, [ownersCaseGroups.data, caseNumber]);
|
|
80
49
|
// value changed logic to show a non local group change
|
|
81
50
|
const [localGroupChange, setLocalGroupChange] = useState(false);
|
|
82
51
|
const afterGroupLocalChange = () => setLocalGroupChange(false);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.38",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -73,8 +73,8 @@
|
|
|
73
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.15",
|
|
77
|
+
"@rh-support/react-context": "1.0.22",
|
|
78
78
|
"@rh-support/types": "0.2.0",
|
|
79
79
|
"@rh-support/user-permissions": "1.0.11",
|
|
80
80
|
"@rh-support/utils": "1.0.9",
|
|
@@ -142,5 +142,5 @@
|
|
|
142
142
|
"not ie <= 11",
|
|
143
143
|
"not op_mini all"
|
|
144
144
|
],
|
|
145
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "5bcb813517a4aff493587c48665551d4aeb1d00e"
|
|
146
146
|
}
|