@rh-support/troubleshoot 2.6.273 → 2.6.280
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/AccountInfo/AccountSelector.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/AccountSelector.js +40 -28
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +1 -3
- package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Case.js +1 -3
- package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +4 -6
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +34 -38
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +4 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +59 -19
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +3 -5
- package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseInformation.js +5 -7
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +24 -37
- package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.js +55 -32
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +2 -2
- package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseManagement.js +7 -4
- package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
- package/lib/esm/components/IdeaInformation/IdeaInformation.js +10 -10
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +2 -4
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +1 -0
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +15 -3
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +37 -13
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +53 -19
- package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductSelector.js +3 -1
- package/lib/esm/components/Review/Review.d.ts.map +1 -1
- package/lib/esm/components/Review/Review.js +10 -6
- package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.js +1 -3
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +64 -50
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +9 -34
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +7 -6
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +9 -10
- package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
- package/lib/esm/hooks/useResetCaseCreate.js +11 -13
- package/lib/esm/reducers/CaseConstNTypes.d.ts +0 -23
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +0 -5
- package/lib/esm/reducers/CaseHelpers.d.ts +1 -2
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +2 -39
- package/lib/esm/reducers/CaseOverviewReducer.d.ts +1 -3
- package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseOverviewReducer.js +5 -7
- package/lib/esm/reducers/CaseReducer.d.ts +5 -15
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +23 -60
- package/package.json +6 -6
|
@@ -7,11 +7,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { useApolloClient } from '@apollo/client/react';
|
|
11
10
|
import { useDebounce } from '@rh-support/components';
|
|
12
11
|
import { GlobalMetadataStateContext, useUserPreferences } from '@rh-support/react-context';
|
|
13
12
|
import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
14
|
-
import { resolveProductServiceLevelsForAccount } from '@rh-support/utils';
|
|
15
13
|
import findIndex from 'lodash/findIndex';
|
|
16
14
|
import includes from 'lodash/includes';
|
|
17
15
|
import isEmpty from 'lodash/isEmpty';
|
|
@@ -25,7 +23,7 @@ import { TCDispatchContext, TCStateContext } from '../../context/TopContentConte
|
|
|
25
23
|
import { useResetCaseCreate } from '../../hooks/useResetCaseCreate';
|
|
26
24
|
import { CASE_DEATILS_SOURCE_REFERRER_LIMIT } from '../../reducers/CaseConstNTypes';
|
|
27
25
|
import { getDescriptionWOQues } from '../../reducers/CaseHelpers';
|
|
28
|
-
import { setCaseAccountNumber, setCaseDetails, setCaseOwner
|
|
26
|
+
import { setCaseAccountNumber, setCaseDetails, setCaseOwner } from '../../reducers/CaseReducer';
|
|
29
27
|
import { AppRouteSections } from '../../reducers/RouteConstNTypes';
|
|
30
28
|
import { setActiveSectionChanged, setRouteFlags, updateisNextBtnClickedToShowValidationError, } from '../../reducers/RouteReducer';
|
|
31
29
|
import { fetchEdmundAbbottRules } from '../../reducers/RulesReducer';
|
|
@@ -38,11 +36,11 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
38
36
|
const dispatchToRouteReducer = useContext(RouteDispatchContext);
|
|
39
37
|
const { globalMetadataState: { allProducts, loggedInUser, managedAccounts, loggedInUserRights, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
40
38
|
const { sessionRestore: { activeSessionId }, } = useContext(SessionRestoreStateContext);
|
|
41
|
-
const { accountNumber,
|
|
39
|
+
const { accountNumber, product, version, contactSsoUsername, summary, issue, environment, periodicityOfIssue, timeFramesAndUrgency, caseType, language, selectedAccountDetails, } = useCaseSelector((state) => ({
|
|
42
40
|
accountNumber: state.caseDetails.accountNumberRef,
|
|
43
|
-
contactSsoUsername: state.caseDetails.contactSSOName,
|
|
44
41
|
product: state.caseDetails.product,
|
|
45
42
|
version: state.caseDetails.version,
|
|
43
|
+
contactSsoUsername: state.caseDetails.contactSSOName,
|
|
46
44
|
summary: state.caseDetails.summary,
|
|
47
45
|
issue: state.caseDetails.issue,
|
|
48
46
|
environment: state.caseDetails.environment,
|
|
@@ -53,7 +51,6 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
53
51
|
selectedAccountDetails: state.selectedAccountDetails,
|
|
54
52
|
}), isEqual);
|
|
55
53
|
const caseDispatch = useCaseDispatch();
|
|
56
|
-
const apolloClient = useApolloClient();
|
|
57
54
|
const isCaseCreate = RouteUtils.getQueryParams(props.routeProps).caseCreate === 'true';
|
|
58
55
|
const urlQueryParams = RouteUtils.getQueryParams(props.routeProps);
|
|
59
56
|
const isFirstMount = useRef(true);
|
|
@@ -158,20 +155,16 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
158
155
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
159
156
|
}, [dispatchToRouteReducer, props.routeProps.location.pathname, isCaseCreate, isSearchIntent]);
|
|
160
157
|
/**
|
|
161
|
-
*
|
|
162
|
-
*
|
|
158
|
+
* Setting Default AccountNumber and ContactSsoUsername from loggedInUsersAccount
|
|
159
|
+
* Disabling exhaustive-deps rule as we don't want to reset default values if user manually clears these from UI.
|
|
160
|
+
* This is a one time thing when loggedInUserJwtToken is set.
|
|
163
161
|
*/
|
|
164
162
|
useEffect(() => {
|
|
165
|
-
|
|
166
|
-
if (loggedInUserRights.data.isInternal())
|
|
167
|
-
return;
|
|
168
|
-
if (isEmpty(accountNumber) && !isEmpty((_a = loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.accountNumber)) {
|
|
169
|
-
setCaseAccountNumber(caseDispatch, loggedInUsersAccount.data.accountNumber, true, loggedInUsersAccount.data, apolloClient);
|
|
170
|
-
}
|
|
163
|
+
isEmpty(accountNumber) && setCaseAccountNumber(caseDispatch, loggedInUserRights.data.getAccountNumber());
|
|
171
164
|
isEmpty(contactSsoUsername) &&
|
|
172
165
|
setCaseOwner(caseDispatch, loggedInUserRights.data.getHydraContactFromLoggedInUser(), product, undefined, undefined, true);
|
|
173
166
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
174
|
-
}, [caseDispatch, loggedInUserRights.data
|
|
167
|
+
}, [caseDispatch, loggedInUserRights.data]);
|
|
175
168
|
/**
|
|
176
169
|
* handling top content call
|
|
177
170
|
*/
|
|
@@ -183,22 +176,6 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
183
176
|
return;
|
|
184
177
|
fetchTopContent(tcDispatch, { product, version });
|
|
185
178
|
}, [product, tcDispatch, topContentPayload, version]);
|
|
186
|
-
useEffect(() => {
|
|
187
|
-
if (isEmpty(product) || selectedAccountDetails.isFetching || isEmpty(selectedAccountDetails.data))
|
|
188
|
-
return;
|
|
189
|
-
const serviceLevels = resolveProductServiceLevelsForAccount(selectedAccountDetails.data, allProducts.data.productsResult, product);
|
|
190
|
-
if (!serviceLevels)
|
|
191
|
-
return;
|
|
192
|
-
setCaseState(caseDispatch, {
|
|
193
|
-
productServiceLevel: serviceLevels.productServiceLevel,
|
|
194
|
-
otherServiceLevels: serviceLevels.otherServiceLevels,
|
|
195
|
-
selectedEntitlementId: serviceLevels.defaultEntitlementId,
|
|
196
|
-
});
|
|
197
|
-
if (serviceLevels.entitlementSla) {
|
|
198
|
-
setCaseDetails(caseDispatch, { entitlementSla: serviceLevels.entitlementSla });
|
|
199
|
-
}
|
|
200
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
201
|
-
}, [product, selectedAccountDetails.data, allProducts.data.productsResult]);
|
|
202
179
|
// set case language to preferred language
|
|
203
180
|
useEffect(() => {
|
|
204
181
|
const userOriginalPreferredLanguage = () => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -275,13 +252,11 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
275
252
|
* each case create. Currently we refetch the account details when user clicks on troubleshoot a new session
|
|
276
253
|
*/
|
|
277
254
|
useEffect(() => {
|
|
278
|
-
if (loggedInUserRights.data.isInternal())
|
|
279
|
-
return;
|
|
280
255
|
if (!isEmpty(loggedInUsersAccount.data) &&
|
|
281
256
|
!isEmpty(selectedAccountDetails.data) &&
|
|
282
257
|
loggedInUserRights.data.isAccountSameAsLoggedInAccount(selectedAccountDetails.data.accountNumber) &&
|
|
283
258
|
!isEqual(loggedInUsersAccount.data, selectedAccountDetails.data)) {
|
|
284
|
-
setCaseAccountNumber(caseDispatch, loggedInUsersAccount.data.accountNumber, true, loggedInUsersAccount.data
|
|
259
|
+
setCaseAccountNumber(caseDispatch, loggedInUsersAccount.data.accountNumber, true, loggedInUsersAccount.data);
|
|
285
260
|
}
|
|
286
261
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
287
262
|
}, [loggedInUsersAccount.data]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardLayout.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WizardLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardLayout.tsx"],"names":[],"mappings":"AASA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAcvG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,qBAqLzC"}
|
|
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { useApolloClient } from '@apollo/client/react';
|
|
11
10
|
import { Grid, GridItem } from '@patternfly/react-core';
|
|
12
11
|
import { SupportFeedbackForm } from '@rh-support/components';
|
|
13
12
|
import { fetchProducts, GlobalMetadataDispatchContext, GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
@@ -38,9 +37,10 @@ export function WizardLayout(props) {
|
|
|
38
37
|
const { routeState: { activeSection, isCaseCreate }, } = useContext(RouteContext);
|
|
39
38
|
const { getMetadata } = useMetadata();
|
|
40
39
|
const [isAIChatMode, setIsAIChatMode] = useState(false);
|
|
41
|
-
const { caseCreationError, caseType, product, caseState, hasInvalidEntitlements } = useCaseSelector((state) => ({
|
|
40
|
+
const { caseCreationError, contactSSOName, caseType, product, caseState, hasInvalidEntitlements } = useCaseSelector((state) => ({
|
|
42
41
|
caseState: state,
|
|
43
42
|
caseCreationError: state.caseCreationError,
|
|
43
|
+
contactSSOName: state.caseDetails.contactSSOName,
|
|
44
44
|
caseType: state.caseDetails.caseType,
|
|
45
45
|
product: state.caseDetails.product,
|
|
46
46
|
hasInvalidEntitlements: state.hasInvalidEntitlements,
|
|
@@ -50,7 +50,6 @@ export function WizardLayout(props) {
|
|
|
50
50
|
const { sessionRestore: { activeSessionId, previousSessions }, } = useContext(SessionRestoreStateContext);
|
|
51
51
|
const { globalMetadataState: { allProducts, loggedInUser, loggedInUsersAccount, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
52
52
|
const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
|
|
53
|
-
const apolloClient = useApolloClient();
|
|
54
53
|
const canAddAttachments = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.ATTACHMENTS);
|
|
55
54
|
const { attachmentState } = useContext(AttachmentStateContext);
|
|
56
55
|
const isAnyFileAttachedLocal = isAnyFileAttached(attachmentState.caseFiles.selectedLocalFiles);
|
|
@@ -102,7 +101,7 @@ export function WizardLayout(props) {
|
|
|
102
101
|
"Try submitting again after a minute. Please ",
|
|
103
102
|
React.createElement(SupportFeedbackForm, { isInline: true }),
|
|
104
103
|
" if you continue to see this message.")));
|
|
105
|
-
submitCase(caseDispatch, sessionRestoreDispatch, caseState, isCaseCreate, errorMessageCaseSubmit500, loggedInUser.data.ssoUsername, loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data.secureSupport, isReSubmitting || false, RouteUtils.getQueryParams(props.routeProps).caseCreate === 'true', sessionItem
|
|
104
|
+
submitCase(caseDispatch, sessionRestoreDispatch, caseState, isCaseCreate, errorMessageCaseSubmit500, loggedInUser.data.ssoUsername, loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data.secureSupport, isReSubmitting || false, RouteUtils.getQueryParams(props.routeProps).caseCreate === 'true', sessionItem);
|
|
106
105
|
// reset viewedModals on case submit
|
|
107
106
|
viewedConfirmationModalsList.current = [];
|
|
108
107
|
!isReSubmitting &&
|
|
@@ -121,9 +120,11 @@ export function WizardLayout(props) {
|
|
|
121
120
|
}
|
|
122
121
|
setConfirmationModalType(null);
|
|
123
122
|
};
|
|
123
|
+
// Loading app metadata
|
|
124
124
|
useEffect(() => {
|
|
125
|
-
fetchProducts(dispatchToGlobalMetadataReducer,
|
|
126
|
-
|
|
125
|
+
fetchProducts(dispatchToGlobalMetadataReducer, contactSSOName);
|
|
126
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
127
|
+
}, [contactSSOName, dispatchToGlobalMetadataReducer]);
|
|
127
128
|
return (React.createElement(React.Fragment, null,
|
|
128
129
|
React.createElement(GlobalTroubleshootEffects, { routeProps: props.routeProps }),
|
|
129
130
|
activeSection !== AppRouteSections.DESCRIBE_IDEA && (React.createElement(PreCaseConfirmationModals, { onModalClose: onModalClose, confirmationModalType: confirmationModalType, onConfirm: () => submitCaseAndNavigate(caseCreationError) })),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardNavigation.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WizardNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardNavigation.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAmE,MAAM,OAAO,CAAC;AAExF,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAUvD,OAAO,EAAoB,eAAe,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAM3G,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,MAAM,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACzD,MAAM,EAAE,CAAC,CAAC,EAA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|
import { useFetch, usePrevious } from '@rh-support/components';
|
|
13
13
|
import { GlobalMetadataStateContext, useCanCreateCase } from '@rh-support/react-context';
|
|
14
14
|
import { dtmTrackEventCaseCreationStepEncountered, getResTypeFromUrl, isFunctionalCookieAccepted, PreviousToNewCaseTypeMap, scrollIntoView, } from '@rh-support/utils';
|
|
15
|
+
import find from 'lodash/find';
|
|
15
16
|
import isEmpty from 'lodash/isEmpty';
|
|
16
17
|
import isEqual from 'lodash/isEqual';
|
|
17
18
|
import React, { useContext, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
@@ -31,15 +32,14 @@ import { RecommendationFeedbackModal } from '../Recommendations/RecommendationFe
|
|
|
31
32
|
import { useIsSectionValid } from '../shared/useIsSectionValid';
|
|
32
33
|
const defaultProps = {};
|
|
33
34
|
function WizardNavigation(props) {
|
|
35
|
+
var _a, _b;
|
|
34
36
|
const { t } = useTranslation();
|
|
35
37
|
const { isVariationA } = useAB();
|
|
36
38
|
const canCreateCase = useCanCreateCase();
|
|
37
39
|
const { recommendationState } = useContext(RecommendationStateContext);
|
|
38
40
|
const aiResponseState = useAIResponseState();
|
|
39
|
-
const { routeState: { activeSection, isNextBtnClickedToShowValidationError,
|
|
40
|
-
|
|
41
|
-
isCaseCreate, }, } = useContext(RouteContext);
|
|
42
|
-
const { globalMetadataState: { loggedInUsersAccount, navBarRef }, } = useContext(GlobalMetadataStateContext);
|
|
41
|
+
const { routeState: { activeSection, isNextBtnClickedToShowValidationError, noValidEntitlement, isSearchIntent, isCaseCreate, }, } = useContext(RouteContext);
|
|
42
|
+
const { globalMetadataState: { loggedInUsersAccount, allProducts, navBarRef }, } = useContext(GlobalMetadataStateContext);
|
|
43
43
|
const { caseState, issue, summary, product, version, caseType } = useCaseSelector((state) => ({
|
|
44
44
|
caseState: state,
|
|
45
45
|
issue: state.caseDetails.issue,
|
|
@@ -49,11 +49,8 @@ function WizardNavigation(props) {
|
|
|
49
49
|
caseType: state.caseDetails.caseType,
|
|
50
50
|
manageSupportCases: state.selectedOwner.data.manageSupportCases,
|
|
51
51
|
}), isEqual);
|
|
52
|
-
//
|
|
53
|
-
|
|
54
|
-
// allProducts?.data?.productsResult,
|
|
55
|
-
// (p) => p.product === caseState.caseDetails.product
|
|
56
|
-
// )?.isEntitledProduct;
|
|
52
|
+
// To check if the user is entitled or not
|
|
53
|
+
const isEntitledProduct = (_b = find((_a = allProducts === null || allProducts === void 0 ? void 0 : allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult, (p) => p.product === caseState.caseDetails.product)) === null || _b === void 0 ? void 0 : _b.isEntitledProduct;
|
|
57
54
|
const dispatchToRouteReducer = useContext(RouteDispatchContext);
|
|
58
55
|
const { activeSectionError, isSectionValidFn } = useIsSectionValid(activeSection);
|
|
59
56
|
const [isRecsModalVisible, setIsRecsModalVisible] = useState(false);
|
|
@@ -254,6 +251,7 @@ function WizardNavigation(props) {
|
|
|
254
251
|
}
|
|
255
252
|
catch (e) { }
|
|
256
253
|
});
|
|
254
|
+
const isEntitledProductLocal = isSearchIntent ? true : isEntitledProduct;
|
|
257
255
|
const nextButtonDisabledLogic = () => {
|
|
258
256
|
const isLoadingARH = props.isLoadingARH &&
|
|
259
257
|
props.activeStep.id === AppRouteSections.RESOURCES &&
|
|
@@ -265,9 +263,10 @@ function WizardNavigation(props) {
|
|
|
265
263
|
let value = isLoadingARH ||
|
|
266
264
|
((isEmpty(summary) || isEmpty(issue) || isEmpty(product) || isEmpty(version)) &&
|
|
267
265
|
props.activeStep.id === (isCaseCreate ? AppRouteSections.SUMMARIZE : AppRouteSections.TROUBLESHOOT)) ||
|
|
266
|
+
(!isEntitledProductLocal && props.activeStep.nextButtonLabel === 'Get support') ||
|
|
268
267
|
props.activeStep.nextButtonLabel === 'Troubleshoot' ||
|
|
269
268
|
(isSectionValidFn && !isSectionValidFn(props.activeStep.id) && isNextBtnClickedToShowValidationError) ||
|
|
270
|
-
|
|
269
|
+
noValidEntitlement ||
|
|
271
270
|
isLoadingRecs;
|
|
272
271
|
return value;
|
|
273
272
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResetCaseCreate.d.ts","sourceRoot":"","sources":["../../../src/hooks/useResetCaseCreate.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useResetCaseCreate.d.ts","sourceRoot":"","sources":["../../../src/hooks/useResetCaseCreate.tsx"],"names":[],"mappings":"AAqBA,wBAAgB,kBAAkB;;EAsCjC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { fetchLoggedInUser, fetchLoggedInUsersAccount, GlobalMetadataDispatchContext, GlobalMetadataStateContext, } from '@rh-support/react-context';
|
|
1
2
|
import { useContext } from 'react';
|
|
2
3
|
import { AttachmentDispatchContext, resetAttachment } from '../components/shared/fileUpload';
|
|
3
4
|
import { useCaseDispatch } from '../context/CaseContext';
|
|
@@ -6,6 +7,7 @@ import { useRecommendationDispatchContext } from '../context/RecommendationConte
|
|
|
6
7
|
import { RulesDispatchContext } from '../context/RulesContext';
|
|
7
8
|
import { TCDispatchContext } from '../context/TopContentContext';
|
|
8
9
|
import { CaseReducerConstants } from '../reducers/CaseConstNTypes';
|
|
10
|
+
import { setCaseAccountNumber, setCaseOwner } from '../reducers/CaseReducer';
|
|
9
11
|
import { resetClusterRecommendations } from '../reducers/ClusterRecommendationsReducer';
|
|
10
12
|
import { resetRecommendations } from '../reducers/RecommendationsReducer';
|
|
11
13
|
import { resetEARules } from '../reducers/RulesReducer';
|
|
@@ -15,26 +17,22 @@ export function useResetCaseCreate() {
|
|
|
15
17
|
const tcDispatch = useContext(TCDispatchContext);
|
|
16
18
|
const recommendationsDispatch = useRecommendationDispatchContext();
|
|
17
19
|
const caseDispatch = useCaseDispatch();
|
|
20
|
+
const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
|
|
18
21
|
const rulesDispatch = useContext(RulesDispatchContext);
|
|
19
22
|
const clusterRecommendationsDispatch = useContext(ClusterRecommendationsDispatchContext);
|
|
23
|
+
const { globalMetadataState: { loggedInUsersAccount, loggedInUserRights, loggedInUserJwtToken }, } = useContext(GlobalMetadataStateContext);
|
|
20
24
|
const resetCaseCreateState = () => {
|
|
21
|
-
//
|
|
22
|
-
|
|
25
|
+
// On case creation we refetch the user contact details to get users updated phone number
|
|
26
|
+
fetchLoggedInUser(dispatchToGlobalMetadataReducer, loggedInUserJwtToken, {});
|
|
23
27
|
resetAttachment(dispatchToAttachmentReducer);
|
|
24
28
|
resetTopContent(tcDispatch);
|
|
25
29
|
resetRecommendations(recommendationsDispatch);
|
|
26
30
|
caseDispatch({ type: CaseReducerConstants.resetCaseState });
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
// loggedInUserRights.data.getHydraContactFromLoggedInUser(),
|
|
33
|
-
// '',
|
|
34
|
-
// undefined,
|
|
35
|
-
// undefined,
|
|
36
|
-
// true
|
|
37
|
-
// );
|
|
31
|
+
// on case creation we refetch the account details to check if user still has all valid
|
|
32
|
+
// access for next case creation. For ex. may be user has exhausted his available enhanced sla limit
|
|
33
|
+
fetchLoggedInUsersAccount(dispatchToGlobalMetadataReducer, loggedInUserJwtToken, true);
|
|
34
|
+
setCaseAccountNumber(caseDispatch, loggedInUserRights.data.getAccountNumber(), true, loggedInUsersAccount.data);
|
|
35
|
+
setCaseOwner(caseDispatch, loggedInUserRights.data.getHydraContactFromLoggedInUser(), '', undefined, undefined, true);
|
|
38
36
|
resetEARules(rulesDispatch);
|
|
39
37
|
resetClusterRecommendations(clusterRecommendationsDispatch);
|
|
40
38
|
};
|
|
@@ -6,7 +6,6 @@ import { IAccount } from '@cee-eng/hydrajs/@types/models/account';
|
|
|
6
6
|
import { ICaseNotificationAddresses } from '@cee-eng/hydrajs/@types/models/case';
|
|
7
7
|
import { IContact } from '@cee-eng/hydrajs/@types/models/contact';
|
|
8
8
|
import { IAction, IAPIError, IApiResponseDetails } from '@rh-support/types/shared';
|
|
9
|
-
import { IServiceLevelInfo } from '@rh-support/utils';
|
|
10
9
|
import { Dispatch } from 'react';
|
|
11
10
|
import { ICVEWorkflowRecommendation } from '../models/caseCreationWorkflows';
|
|
12
11
|
export declare const TITLE_SUMMARY_LENGTH_LIMIT = 255;
|
|
@@ -237,27 +236,6 @@ export interface ICaseState {
|
|
|
237
236
|
isCveModalOpened?: boolean;
|
|
238
237
|
ABTestVariation?: string;
|
|
239
238
|
openShiftClusterSupportLevel?: string;
|
|
240
|
-
productServiceLevel?: IServiceLevelInfo;
|
|
241
|
-
otherServiceLevels?: IServiceLevelInfo[];
|
|
242
|
-
selectedEntitlementId?: string;
|
|
243
|
-
selectedVersionId?: string;
|
|
244
|
-
}
|
|
245
|
-
export interface IGraphQLCasePayload {
|
|
246
|
-
ContactId?: string;
|
|
247
|
-
EntitlementId?: string;
|
|
248
|
-
Language?: string;
|
|
249
|
-
Type?: string;
|
|
250
|
-
Priority?: string;
|
|
251
|
-
Subject?: string;
|
|
252
|
-
Description?: string;
|
|
253
|
-
ImpactOnUserOrBusiness__c?: string;
|
|
254
|
-
EnvironmentInWhichItOccurs__c?: string;
|
|
255
|
-
FrequencyOfIssueOccurrence__c?: string;
|
|
256
|
-
SuppliedPhone?: string;
|
|
257
|
-
ProductId?: string;
|
|
258
|
-
Origin?: string;
|
|
259
|
-
RecordTypeId?: string;
|
|
260
|
-
AlternateCaseId__c?: string;
|
|
261
239
|
}
|
|
262
240
|
export interface ICreateCasePayloadType extends ICaseState {
|
|
263
241
|
}
|
|
@@ -265,7 +243,6 @@ export type ICaseActionType = IAction<CaseReducerConstants, ICreateCasePayloadTy
|
|
|
265
243
|
export type CaseReducerDispatchType = Dispatch<ICaseActionType>;
|
|
266
244
|
export declare const ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = "https://access.redhat.com/articles/5967811";
|
|
267
245
|
export declare const NON_ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = "https://access.redhat.com/articles/5967831";
|
|
268
|
-
export declare const LANGUAGE_MAP: Record<string, string>;
|
|
269
246
|
export declare const excludedCaseTypesforARH: string[];
|
|
270
247
|
export declare const appSourceId_ARH = "PCM-001";
|
|
271
248
|
//# sourceMappingURL=CaseConstNTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseConstNTypes.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseConstNTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACjH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseConstNTypes.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseConstNTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACjH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,Q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OAAO,CAAC;IACzC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,sCAAsC,CAAC,EAAE,OAAO,CAAC;IACjD,kDAAkD,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxE,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,mCAAmC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC;IAChF,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,yBAAyB,CAAC,EAAE,0BAA0B,EAAE,CAAC;IACzD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4BAA4B,CAAC,EAAE,MAAM,CAAC;CACzC;AAED,MAAM,WAAW,sBAAuB,SAAQ,UAAU;CAAG;AAC7D,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,oBAAoB,EAAE,sBAAsB,CAAC,CAAC;AACpF,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;AAEhE,eAAO,MAAM,qCAAqC,+CAA+C,CAAC;AAClG,eAAO,MAAM,yCAAyC,+CAA+C,CAAC;AAEtG,eAAO,MAAM,uBAAuB,UAAoC,CAAC;AACzE,eAAO,MAAM,eAAe,YAAY,CAAC"}
|
|
@@ -231,13 +231,8 @@ export const initialCaseState = {
|
|
|
231
231
|
cveWorkflowRecommendation: [],
|
|
232
232
|
isCveModalOpened: true,
|
|
233
233
|
ABTestVariation: 'B',
|
|
234
|
-
productServiceLevel: undefined,
|
|
235
|
-
otherServiceLevels: [],
|
|
236
|
-
selectedEntitlementId: undefined,
|
|
237
|
-
selectedVersionId: undefined,
|
|
238
234
|
};
|
|
239
235
|
export const ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = 'https://access.redhat.com/articles/5967811';
|
|
240
236
|
export const NON_ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = 'https://access.redhat.com/articles/5967831';
|
|
241
|
-
export const LANGUAGE_MAP = { en: 'en_US', zh: 'zh_CN', pt: 'pt_BR' };
|
|
242
237
|
export const excludedCaseTypesforARH = ['Feature / Enhancement Request'];
|
|
243
238
|
export const appSourceId_ARH = 'PCM-001';
|
|
@@ -6,7 +6,7 @@ import { ISolrRecommendation } from '@cee-eng/hydrajs/@types/models/solr/solr';
|
|
|
6
6
|
import { IApiResponseDetails } from '@rh-support/types/shared';
|
|
7
7
|
import { UserAuth } from '@rh-support/user-permissions';
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import { ICaseState
|
|
9
|
+
import { ICaseState } from './CaseConstNTypes';
|
|
10
10
|
export declare const getCaseRecommendations: (docs: ISolrRecommendation[], oldDocs: any) => any[];
|
|
11
11
|
export declare const getCepCommentFromCepDetails: (cepDetails: ICepDetails) => string;
|
|
12
12
|
export declare const getRecommendationObject: (doc: ISolrRecommendation, index: number) => ICaseResourceLink;
|
|
@@ -21,7 +21,6 @@ export declare const isCaseStateValid: (caseState: ICaseState, loggedInUserRight
|
|
|
21
21
|
export declare const isIdeaCaseStateValid: (caseState: ICaseState, loggedInUserRights: IApiResponseDetails<UserAuth>) => boolean;
|
|
22
22
|
export declare const isCaseManagementStateValid: (caseState: ICaseState, loggedInUserRights: IApiResponseDetails<UserAuth>) => boolean;
|
|
23
23
|
export declare const isCaseInformationSectionValid: (caseState: ICaseState, loggedInUserRights: IApiResponseDetails<UserAuth>) => boolean;
|
|
24
|
-
export declare const createCasePayloadGraphQL: (caseState: ICaseState, sessionItem?: ISessionItem, isCaseCreate?: boolean) => IGraphQLCasePayload;
|
|
25
24
|
export declare const createCasePayload: (caseState: ICaseState, sessionItem?: ISessionItem, isCaseCreate?: boolean) => Partial<ICasePayload>;
|
|
26
25
|
export declare const getProcessedEntitlements: (caseEntitlements: IEntitlement[]) => IEntitlement[];
|
|
27
26
|
export declare const getHasInvalidEntitlements: (caseEntitlements: IEntitlement[]) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseHelpers.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACpG,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACvG,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseHelpers.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACpG,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACvG,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAexD,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAOH,UAAU,EAkBb,MAAM,mBAAmB,CAAC;AAE3B,eAAO,MAAM,sBAAsB,GAAI,MAAM,mBAAmB,EAAE,EAAE,YAAO,UAM1E,CAAC;AAEF,eAAO,MAA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C,KAClD,OAkBF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC1B,WAAW,UAAU,EACrB,cAAc,YAAY,EAC1B,eAAc,OAAe,KAC9B,OAAO,CAAC,YAAY,CA6EtB,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,kBAAkB,YAAY,EAAE,KAAG,YAAY,EAEvF,CAAC;AACF,eAAO,MAAM,yBAAyB,GAAI,kBAAkB,YAAY,EAAE,KAAG,OAE5E,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAClC,aAAa,YAAY,EACzB,2BAA2B,MAAM,EACjC,iBAAiB,MAAM,KACxB,OAAO,CAAC,YAAY,CAiCtB,CAAC;AACF,eAAO,MAAM,yBAAyB,GAClC,aAAa,OAAO,CAAC,YAAY,CAAC,EAClC,8BAA8B,QAAQ,EAAE,KACzC,eAiDF,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getAppVersion,
|
|
1
|
+
import { getAppVersion, getUserAgentForCaseMode, getVersion, isPremiumEntitlement, showFtsOnCreateCasePage, } from '@rh-support/utils';
|
|
2
2
|
import filter from 'lodash/filter';
|
|
3
3
|
import forEach from 'lodash/forEach';
|
|
4
4
|
import isEmpty from 'lodash/isEmpty';
|
|
@@ -9,7 +9,7 @@ import uniqBy from 'lodash/uniqBy';
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import { isPhoneValid, trimAndReplacePlus } from '../components/shared/utils';
|
|
11
11
|
import { getIsClusterIdInvalid, isClusterIdEnabledForProduct } from '../utils/caseOpenshiftClusterIdUtils';
|
|
12
|
-
import { CASE_DETAILS_ISSUE_LIMIT, CASE_REFERENCE_NUMBER_LIMIT, CLUSTER_ID_LIMIT, CONTACT_INFO_24X7_LIMIT, DESCRIPTION_LENGTH_LIMIT, HOSTNAME_LENGTH_LIMIT, IDEA_SECOND_KTQUESTION_MAX_LIMIT, ITRForSLASeverity, KTQUESTION_MAX_LIMIT, KtQuestionConstant,
|
|
12
|
+
import { CASE_DETAILS_ISSUE_LIMIT, CASE_REFERENCE_NUMBER_LIMIT, CLUSTER_ID_LIMIT, CONTACT_INFO_24X7_LIMIT, DESCRIPTION_LENGTH_LIMIT, HOSTNAME_LENGTH_LIMIT, IDEA_SECOND_KTQUESTION_MAX_LIMIT, ITRForSLASeverity, KTQUESTION_MAX_LIMIT, KtQuestionConstant, SESSION_ENVIRONMENT_LIMIT, SESSION_ISSUE_LIMIT, SESSION_NO_CLUSTER_REASON_EXPLANATION_LENGTH_LIMIT, SESSION_NO_CLUSTER_REASON_LENGTH_LIMIT, SESSION_NOTIFIED_USERS_EXTERNAL_LIMIT, SESSION_NOTIFIED_USERS_INTERNAL_LIMIT, SESSION_PERIODICITY_OF_ISSUE_LIMIT, SESSION_PHONE_LENGTH_LIMIT, SESSION_TIME_FRAMES_URGENCY_LIMIT, SeverityDescription, SeverityDescriptionDetails, TITLE_SUMMARY_LENGTH_LIMIT, } from './CaseConstNTypes';
|
|
13
13
|
export const getCaseRecommendations = (docs, oldDocs) => {
|
|
14
14
|
const recs = [];
|
|
15
15
|
docs.forEach((doc, i) => {
|
|
@@ -225,43 +225,6 @@ export const isCaseInformationSectionValid = (caseState, loggedInUserRights) =>
|
|
|
225
225
|
!isEmpty(case_details.accountNumberRef) &&
|
|
226
226
|
loggedInUserRights.data.canManageCases());
|
|
227
227
|
};
|
|
228
|
-
export const createCasePayloadGraphQL = (caseState, sessionItem, isCaseCreate = false) => {
|
|
229
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
230
|
-
const casePayload = {};
|
|
231
|
-
const case_details = caseState.caseDetails;
|
|
232
|
-
!isEmpty(case_details.summary) && (casePayload.Subject = case_details.summary);
|
|
233
|
-
!isEmpty(case_details.caseType) && (casePayload.Type = case_details.caseType);
|
|
234
|
-
!isEmpty(case_details.severity) && (casePayload.Priority = case_details.severity);
|
|
235
|
-
if (!isEmpty(case_details.caseLanguage)) {
|
|
236
|
-
casePayload.Language = (_a = LANGUAGE_MAP[case_details.caseLanguage]) !== null && _a !== void 0 ? _a : case_details.caseLanguage;
|
|
237
|
-
}
|
|
238
|
-
!isEmpty(case_details.issue) &&
|
|
239
|
-
(!isEmpty(case_details.environment) ||
|
|
240
|
-
!isEmpty(case_details.periodicityOfIssue) ||
|
|
241
|
-
!isEmpty(case_details.timeFramesAndUrgency)) &&
|
|
242
|
-
(casePayload.Description = case_details.issue);
|
|
243
|
-
// TODO: EnvironmentInWhichItOccurs__c is not in the GraphQL schema yet — re-enable once supported
|
|
244
|
-
// (!isEmpty(case_details.environment) || !isEmpty(caseState.v3ClusterName)) &&
|
|
245
|
-
// (casePayload.EnvironmentInWhichItOccurs__c = `${
|
|
246
|
-
// caseState.v3ClusterName ? `OpenShift Cluster Name: ${caseState.v3ClusterName}\n` : ''
|
|
247
|
-
// } ${case_details.environment}`);
|
|
248
|
-
// TODO: FrequencyOfIssueOccurrence__c is not in the GraphQL schema yet — re-enable once supported
|
|
249
|
-
// !isEmpty(case_details.periodicityOfIssue) &&
|
|
250
|
-
// (casePayload.FrequencyOfIssueOccurrence__c = case_details.periodicityOfIssue);
|
|
251
|
-
!isEmpty(case_details.timeFramesAndUrgency) &&
|
|
252
|
-
(casePayload.ImpactOnUserOrBusiness__c = case_details.timeFramesAndUrgency);
|
|
253
|
-
casePayload.Origin = (_c = (_b = sessionItem === null || sessionItem === void 0 ? void 0 : sessionItem.session) === null || _b === void 0 ? void 0 : _b.originatingSystem) !== null && _c !== void 0 ? _c : getUserAgentForCaseMode(isCaseCreate);
|
|
254
|
-
casePayload.RecordTypeId = getTechnicalSupportRecordTypeId();
|
|
255
|
-
const contactId = (_e = (_d = caseState.selectedOwner) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.id;
|
|
256
|
-
!isEmpty(contactId) && (casePayload.ContactId = contactId);
|
|
257
|
-
!isEmpty(caseState.selectedEntitlementId) && (casePayload.EntitlementId = caseState.selectedEntitlementId);
|
|
258
|
-
!isEmpty(caseState.selectedVersionId) && (casePayload.ProductId = caseState.selectedVersionId);
|
|
259
|
-
!isEmpty((_f = case_details.phoneAreaCodePrefixLineNumber) === null || _f === void 0 ? void 0 : _f.trim()) &&
|
|
260
|
-
(casePayload.SuppliedPhone = (_g = case_details.phoneAreaCodePrefixLineNumber) === null || _g === void 0 ? void 0 : _g.trim());
|
|
261
|
-
// TODO: Map alternateId to AlternateCaseId__c once confirmed in GraphQL schema
|
|
262
|
-
// !isEmpty(case_details.alternateId) && (casePayload.AlternateCaseId__c = case_details.alternateId);
|
|
263
|
-
return casePayload;
|
|
264
|
-
};
|
|
265
228
|
export const createCasePayload = (caseState, sessionItem, isCaseCreate = false) => {
|
|
266
229
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
267
230
|
const casePayload = {};
|
|
@@ -29,9 +29,7 @@ export declare const setSelectedStatus: (dispatch: CaseDetailsReducerDispatchTyp
|
|
|
29
29
|
export declare const setSeverityUpdating: (dispatch: CaseDetailsReducerDispatchType, caseSeverityUpdating: boolean) => void;
|
|
30
30
|
export declare const setStatusUpdating: (dispatch: CaseDetailsReducerDispatchType, caseStatusUpdating: boolean) => void;
|
|
31
31
|
export declare const setTypeUpdating: (dispatch: CaseDetailsReducerDispatchType, caseTypeUpdating: boolean) => void;
|
|
32
|
-
export declare const fetchAllStatuses: (dispatch: CaseDetailsReducerDispatchType,
|
|
33
|
-
query: (options: any) => Promise<any>;
|
|
34
|
-
}) => Promise<void>;
|
|
32
|
+
export declare const fetchAllStatuses: (dispatch: CaseDetailsReducerDispatchType, isSecureSupport: boolean) => Promise<void>;
|
|
35
33
|
export declare const fetchCaseHydra: (dispatch: CaseDetailsReducerDispatchType, caseNumber: string) => Promise<void>;
|
|
36
34
|
export {};
|
|
37
35
|
//# sourceMappingURL=CaseOverviewReducer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseOverviewReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseOverviewReducer.ts"],"names":[],"mappings":"AACA,OAA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,mBAAmB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;CAC1D;AAED,eAAO,MAAM,oBAAoB,EAAE,cAYlC,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,OAAO,cAAc,EAAE,QAAQ,WAAW,KAAG,cAkBhF,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,UAAU,8BAA8B,EAAE,cAAc,MAAM,SAE7F,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,UAAU,8BAA8B,EAAE,kBAAkB,MAAM,SAErG,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,UAAU,8BAA8B,EAAE,gBAAgB,MAAM,SAEjG,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,UAAU,8BAA8B,EAAE,sBAAsB,OAAO,SAE1G,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,UAAU,8BAA8B,EAAE,oBAAoB,OAAO,SAEtG,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,UAAU,8BAA8B,EAAE,kBAAkB,OAAO,SAElG,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAU,UAAU,8BAA8B,EAAE,iBAAiB,OAAO,kBAiBxG,CAAC;AAEF,eAAO,MAAM,cAAc,GAAU,UAAU,8BAA8B,EAAE,YAAY,MAAM,kBAiBhG,CAAC"}
|
|
@@ -7,8 +7,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { fields, kase } from '@cee-eng/hydrajs';
|
|
11
|
-
import {
|
|
10
|
+
import { caseMetadata, fields, kase } from '@cee-eng/hydrajs';
|
|
11
|
+
import { getApiResourceObject } from '@rh-support/utils';
|
|
12
12
|
export var CaseDetailsConstants;
|
|
13
13
|
(function (CaseDetailsConstants) {
|
|
14
14
|
CaseDetailsConstants["setSelectedValue"] = "setSelectedValue";
|
|
@@ -66,18 +66,16 @@ export const setStatusUpdating = (dispatch, caseStatusUpdating) => {
|
|
|
66
66
|
export const setTypeUpdating = (dispatch, caseTypeUpdating) => {
|
|
67
67
|
dispatch({ type: CaseDetailsConstants.setUpdating, payload: { caseTypeUpdating } });
|
|
68
68
|
};
|
|
69
|
-
export const fetchAllStatuses = (dispatch,
|
|
70
|
-
var _a;
|
|
69
|
+
export const fetchAllStatuses = (dispatch, isSecureSupport) => __awaiter(void 0, void 0, void 0, function* () {
|
|
71
70
|
dispatch({
|
|
72
71
|
type: CaseDetailsConstants.getCaseStatuses,
|
|
73
72
|
payload: { allCaseStatuses: getApiResourceObject([], true) },
|
|
74
73
|
});
|
|
75
74
|
try {
|
|
76
|
-
const
|
|
77
|
-
const allCaseStatuses = (_a = picklists.Status) !== null && _a !== void 0 ? _a : [];
|
|
75
|
+
const caseStatusesResponse = yield caseMetadata.getStatuses(isSecureSupport);
|
|
78
76
|
dispatch({
|
|
79
77
|
type: CaseDetailsConstants.getCaseStatuses,
|
|
80
|
-
payload: { allCaseStatuses: getApiResourceObject(
|
|
78
|
+
payload: { allCaseStatuses: getApiResourceObject(caseStatusesResponse.items) },
|
|
81
79
|
});
|
|
82
80
|
}
|
|
83
81
|
catch (e) {
|
|
@@ -12,9 +12,7 @@ export declare const caseReducer: (pState: ICaseState, action: any) => ICaseStat
|
|
|
12
12
|
export declare const setCaseDetails: (dispatch: CaseReducerDispatchType, caseState: Partial<ICasePayload>) => void;
|
|
13
13
|
export declare const setCaseState: (dispatch: CaseReducerDispatchType, caseState: Partial<ICaseState>) => void;
|
|
14
14
|
export declare const setNotifiedUser: (dispatch: CaseReducerDispatchType, selectedNotificationContacts: IContact[]) => void;
|
|
15
|
-
export declare const submitCase: (dispatch: CaseReducerDispatchType, sessionRestoreDispatch: SessionReducerDispatchType, caseDetails: ICaseState, isCaseCreate: boolean, errorMessage500: string | JSX.Element, loggedInUserSsoUsername: string, isSecureSupport: boolean, isResubmit: boolean, isCreatingCaseFlow: boolean, sessionItem?: ISessionItem
|
|
16
|
-
mutate: (options: any) => Promise<any>;
|
|
17
|
-
}) => Promise<void>;
|
|
15
|
+
export declare const submitCase: (dispatch: CaseReducerDispatchType, sessionRestoreDispatch: SessionReducerDispatchType, caseDetails: ICaseState, isCaseCreate: boolean, errorMessage500: string | JSX.Element, loggedInUserSsoUsername: string, isSecureSupport: boolean, isResubmit: boolean, isCreatingCaseFlow: boolean, sessionItem?: ISessionItem) => Promise<void>;
|
|
18
16
|
/**
|
|
19
17
|
* Update case details if there is HTTP 500 error while submitting case
|
|
20
18
|
* @param dispatch CaseReducerDispatchType
|
|
@@ -37,19 +35,13 @@ export declare const submitNotifiedUser: (dispatch: CaseReducerDispatchType, cas
|
|
|
37
35
|
export declare const deleteNotifiedUsers: (dispatch: CaseReducerDispatchType, caseNumber: string, ssoUsernames: string[]) => Promise<void>;
|
|
38
36
|
export declare const addingNotifiedUsers: (dispatch: CaseReducerDispatchType, caseNumber: string, addedUsers: IContact[]) => Promise<void>;
|
|
39
37
|
export declare const clearSelectedAccount: (dispatch: CaseReducerDispatchType) => void;
|
|
40
|
-
export declare const setCaseAccountNumber: (dispatch: CaseReducerDispatchType, accountNumber: string, isLoggedInUsersAccount?: boolean, loggedInUserAccount?: Partial<IAccount
|
|
41
|
-
query: (options: any) => Promise<any>;
|
|
42
|
-
}) => Promise<void>;
|
|
38
|
+
export declare const setCaseAccountNumber: (dispatch: CaseReducerDispatchType, accountNumber: string, isLoggedInUsersAccount?: boolean, loggedInUserAccount?: Partial<IAccount>) => Promise<void>;
|
|
43
39
|
export declare const fetchCaseGroupsForAccount: (dispatch: CaseReducerDispatchType, accountNumber: string, setCaseGroupToUngroupedOrDefault?: boolean, abortSignal?: AbortSignal, caseGroupNumberToRestore?: string | undefined) => Promise<void>;
|
|
44
40
|
export declare const setCaseOwner: (dispatch: CaseReducerDispatchType, owner: IContact, product: string, abortSignalCaseGroup?: AbortSignal, abortSignalEntitlements?: AbortSignal, setCaseGroupToUngroupedOrDefault?: boolean, caseGroupNumberToRestore?: string | undefined, canChangeGroup?: boolean, isUserUpdate?: boolean, caseNumber?: string) => Promise<void>;
|
|
45
41
|
export declare const fetchCaseEntitlements: (dispatch: CaseReducerDispatchType, ssoUserName: string, product?: string, abortSignal?: AbortSignal, isUserUpdate?: boolean, caseNumber?: string) => Promise<void>;
|
|
46
42
|
export declare const fetchCaseGroupsForSSO: (dispatch: CaseReducerDispatchType, contactSsoUsername: string, setCaseGroupToUngroupedOrDefault?: boolean, abortSignal?: AbortSignal, caseGroupNumberToRestore?: string | undefined) => Promise<void>;
|
|
47
|
-
export declare const updateCaseWithSession: (dispatch: CaseReducerDispatchType, sessionItem: ISessionItem, loggedInUserAccountNumber: string, loggedInUserContact: IContact, loggedInUserAccount?: Partial<IAccount
|
|
48
|
-
|
|
49
|
-
}) => Promise<void>;
|
|
50
|
-
export declare const fetchCaseDetails: (dispatch: CaseReducerDispatchType, caseNumber: string, loggedInUserRights: any, loggedInUser: any, apolloClient?: {
|
|
51
|
-
query: (options: any) => Promise<any>;
|
|
52
|
-
}) => Promise<void>;
|
|
43
|
+
export declare const updateCaseWithSession: (dispatch: CaseReducerDispatchType, sessionItem: ISessionItem, loggedInUserAccountNumber: string, loggedInUserContact: IContact, loggedInUserAccount?: Partial<IAccount>) => Promise<void>;
|
|
44
|
+
export declare const fetchCaseDetails: (dispatch: CaseReducerDispatchType, caseNumber: string, loggedInUserRights: any, loggedInUser: any) => Promise<void>;
|
|
53
45
|
export declare const updateCaseDetails: (dispatch: CaseReducerDispatchType, caseNumber: string, caseDetails: Partial<ICasePayload>, dontSetDetails?: boolean) => Promise<never>;
|
|
54
46
|
export declare const getNotificationContacts4InternalUser: (dispatch: CaseReducerDispatchType, users: INotifiedUser[], caseOwnerSSO: string) => Promise<void>;
|
|
55
47
|
export declare const getNotificationContacts4ExternalUser: (dispatch: CaseReducerDispatchType, users: any, loggedInUserRights: any, accountNumber: any, caseOwnerSSO: string, fullNameCustom: string) => Promise<void>;
|
|
@@ -57,9 +49,7 @@ export declare const checkForCaseStatusToggleOnAttachOrComment: (dispatch: CaseR
|
|
|
57
49
|
export declare const setSelectedCaseGroupUsers: (dispatch: CaseReducerDispatchType, accountNumber: string, groupNumber: string, loggedInUserRights: UserAuth) => Promise<void>;
|
|
58
50
|
export declare function getCustomNotificationEmails(dispatch: CaseReducerDispatchType, caseNumber: string): Promise<void>;
|
|
59
51
|
export declare function updateEmailListState(dispatch: CaseReducerDispatchType, email: string, customEmailsList: IApiResponseDetails<Partial<ICaseNotificationAddresses[]>>, callback: (email: string) => ICaseNotificationAddresses[]): void;
|
|
60
|
-
export declare function getVersionsDetails(dispatch: CaseReducerDispatchType,
|
|
61
|
-
query: (options: any) => Promise<any>;
|
|
62
|
-
}, parentProductId: string, parentProductName: string): Promise<void>;
|
|
52
|
+
export declare function getVersionsDetails(dispatch: CaseReducerDispatchType, product: string): Promise<void>;
|
|
63
53
|
export declare const setRemoteRiderFlag: (dispatch: CaseReducerDispatchType, flag: boolean) => void;
|
|
64
54
|
export declare const setABTestVariation: (dispatch: CaseReducerDispatchType, ABTestVariation: string) => void;
|
|
65
55
|
//# sourceMappingURL=CaseReducer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseReducer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseReducer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAEtH,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAA+B,MAAM,qCAAqC,CAAC;AAC9G,OAAO,EAAE,QAAQ,EAAE,MAAM,wC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