@rh-support/troubleshoot 2.6.271 → 2.6.276
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 +28 -40
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +3 -1
- package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Case.js +3 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +6 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +38 -34
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +2 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +19 -59
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +5 -3
- package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseInformation.js +7 -5
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +37 -24
- package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.js +32 -55
- 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 +4 -7
- 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 +4 -2
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +0 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +3 -15
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +13 -37
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +19 -53
- package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductSelector.js +1 -3
- package/lib/esm/components/Review/Review.d.ts.map +1 -1
- package/lib/esm/components/Review/Review.js +6 -10
- package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.js +3 -1
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +50 -64
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +34 -9
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +6 -7
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +10 -9
- package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
- package/lib/esm/hooks/useResetCaseCreate.js +13 -11
- package/lib/esm/reducers/CaseConstNTypes.d.ts +23 -0
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +5 -0
- package/lib/esm/reducers/CaseHelpers.d.ts +2 -1
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +39 -2
- package/lib/esm/reducers/CaseOverviewReducer.d.ts +3 -1
- package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseOverviewReducer.js +7 -5
- package/lib/esm/reducers/CaseReducer.d.ts +15 -5
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +60 -23
- package/package.json +6 -6
|
@@ -7,9 +7,11 @@ 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';
|
|
10
11
|
import { useDebounce } from '@rh-support/components';
|
|
11
12
|
import { GlobalMetadataStateContext, useUserPreferences } from '@rh-support/react-context';
|
|
12
13
|
import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
14
|
+
import { resolveProductServiceLevelsForAccount } from '@rh-support/utils';
|
|
13
15
|
import findIndex from 'lodash/findIndex';
|
|
14
16
|
import includes from 'lodash/includes';
|
|
15
17
|
import isEmpty from 'lodash/isEmpty';
|
|
@@ -23,7 +25,7 @@ import { TCDispatchContext, TCStateContext } from '../../context/TopContentConte
|
|
|
23
25
|
import { useResetCaseCreate } from '../../hooks/useResetCaseCreate';
|
|
24
26
|
import { CASE_DEATILS_SOURCE_REFERRER_LIMIT } from '../../reducers/CaseConstNTypes';
|
|
25
27
|
import { getDescriptionWOQues } from '../../reducers/CaseHelpers';
|
|
26
|
-
import { setCaseAccountNumber, setCaseDetails, setCaseOwner } from '../../reducers/CaseReducer';
|
|
28
|
+
import { setCaseAccountNumber, setCaseDetails, setCaseOwner, setCaseState } from '../../reducers/CaseReducer';
|
|
27
29
|
import { AppRouteSections } from '../../reducers/RouteConstNTypes';
|
|
28
30
|
import { setActiveSectionChanged, setRouteFlags, updateisNextBtnClickedToShowValidationError, } from '../../reducers/RouteReducer';
|
|
29
31
|
import { fetchEdmundAbbottRules } from '../../reducers/RulesReducer';
|
|
@@ -36,11 +38,11 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
36
38
|
const dispatchToRouteReducer = useContext(RouteDispatchContext);
|
|
37
39
|
const { globalMetadataState: { allProducts, loggedInUser, managedAccounts, loggedInUserRights, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
38
40
|
const { sessionRestore: { activeSessionId }, } = useContext(SessionRestoreStateContext);
|
|
39
|
-
const { accountNumber, product, version,
|
|
41
|
+
const { accountNumber, contactSsoUsername, product, version, summary, issue, environment, periodicityOfIssue, timeFramesAndUrgency, caseType, language, selectedAccountDetails, } = useCaseSelector((state) => ({
|
|
40
42
|
accountNumber: state.caseDetails.accountNumberRef,
|
|
43
|
+
contactSsoUsername: state.caseDetails.contactSSOName,
|
|
41
44
|
product: state.caseDetails.product,
|
|
42
45
|
version: state.caseDetails.version,
|
|
43
|
-
contactSsoUsername: state.caseDetails.contactSSOName,
|
|
44
46
|
summary: state.caseDetails.summary,
|
|
45
47
|
issue: state.caseDetails.issue,
|
|
46
48
|
environment: state.caseDetails.environment,
|
|
@@ -51,6 +53,7 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
51
53
|
selectedAccountDetails: state.selectedAccountDetails,
|
|
52
54
|
}), isEqual);
|
|
53
55
|
const caseDispatch = useCaseDispatch();
|
|
56
|
+
const apolloClient = useApolloClient();
|
|
54
57
|
const isCaseCreate = RouteUtils.getQueryParams(props.routeProps).caseCreate === 'true';
|
|
55
58
|
const urlQueryParams = RouteUtils.getQueryParams(props.routeProps);
|
|
56
59
|
const isFirstMount = useRef(true);
|
|
@@ -155,16 +158,20 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
155
158
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
156
159
|
}, [dispatchToRouteReducer, props.routeProps.location.pathname, isCaseCreate, isSearchIntent]);
|
|
157
160
|
/**
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
* This is a one time thing when loggedInUserJwtToken is set.
|
|
161
|
+
* Auto-populate account and owner from logged-in user for external users only.
|
|
162
|
+
* Internal users select account/owner manually on Get Support.
|
|
161
163
|
*/
|
|
162
164
|
useEffect(() => {
|
|
163
|
-
|
|
165
|
+
var _a;
|
|
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
|
+
}
|
|
164
171
|
isEmpty(contactSsoUsername) &&
|
|
165
172
|
setCaseOwner(caseDispatch, loggedInUserRights.data.getHydraContactFromLoggedInUser(), product, undefined, undefined, true);
|
|
166
173
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
167
|
-
}, [caseDispatch, loggedInUserRights.data]);
|
|
174
|
+
}, [caseDispatch, loggedInUserRights.data, loggedInUsersAccount.data, apolloClient]);
|
|
168
175
|
/**
|
|
169
176
|
* handling top content call
|
|
170
177
|
*/
|
|
@@ -176,6 +183,22 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
176
183
|
return;
|
|
177
184
|
fetchTopContent(tcDispatch, { product, version });
|
|
178
185
|
}, [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]);
|
|
179
202
|
// set case language to preferred language
|
|
180
203
|
useEffect(() => {
|
|
181
204
|
const userOriginalPreferredLanguage = () => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -252,11 +275,13 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
252
275
|
* each case create. Currently we refetch the account details when user clicks on troubleshoot a new session
|
|
253
276
|
*/
|
|
254
277
|
useEffect(() => {
|
|
278
|
+
if (loggedInUserRights.data.isInternal())
|
|
279
|
+
return;
|
|
255
280
|
if (!isEmpty(loggedInUsersAccount.data) &&
|
|
256
281
|
!isEmpty(selectedAccountDetails.data) &&
|
|
257
282
|
loggedInUserRights.data.isAccountSameAsLoggedInAccount(selectedAccountDetails.data.accountNumber) &&
|
|
258
283
|
!isEqual(loggedInUsersAccount.data, selectedAccountDetails.data)) {
|
|
259
|
-
setCaseAccountNumber(caseDispatch, loggedInUsersAccount.data.accountNumber, true, loggedInUsersAccount.data);
|
|
284
|
+
setCaseAccountNumber(caseDispatch, loggedInUsersAccount.data.accountNumber, true, loggedInUsersAccount.data, apolloClient);
|
|
260
285
|
}
|
|
261
286
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
262
287
|
}, [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":"AAUA,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,qBAoLzC"}
|
|
@@ -7,6 +7,7 @@ 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';
|
|
10
11
|
import { Grid, GridItem } from '@patternfly/react-core';
|
|
11
12
|
import { SupportFeedbackForm } from '@rh-support/components';
|
|
12
13
|
import { fetchProducts, GlobalMetadataDispatchContext, GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
@@ -37,10 +38,9 @@ export function WizardLayout(props) {
|
|
|
37
38
|
const { routeState: { activeSection, isCaseCreate }, } = useContext(RouteContext);
|
|
38
39
|
const { getMetadata } = useMetadata();
|
|
39
40
|
const [isAIChatMode, setIsAIChatMode] = useState(false);
|
|
40
|
-
const { caseCreationError,
|
|
41
|
+
const { caseCreationError, caseType, product, caseState, hasInvalidEntitlements } = useCaseSelector((state) => ({
|
|
41
42
|
caseState: state,
|
|
42
43
|
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,6 +50,7 @@ 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();
|
|
53
54
|
const canAddAttachments = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.ATTACHMENTS);
|
|
54
55
|
const { attachmentState } = useContext(AttachmentStateContext);
|
|
55
56
|
const isAnyFileAttachedLocal = isAnyFileAttached(attachmentState.caseFiles.selectedLocalFiles);
|
|
@@ -101,7 +102,7 @@ export function WizardLayout(props) {
|
|
|
101
102
|
"Try submitting again after a minute. Please ",
|
|
102
103
|
React.createElement(SupportFeedbackForm, { isInline: true }),
|
|
103
104
|
" if you continue to see this message.")));
|
|
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);
|
|
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, apolloClient);
|
|
105
106
|
// reset viewedModals on case submit
|
|
106
107
|
viewedConfirmationModalsList.current = [];
|
|
107
108
|
!isReSubmitting &&
|
|
@@ -120,11 +121,9 @@ export function WizardLayout(props) {
|
|
|
120
121
|
}
|
|
121
122
|
setConfirmationModalType(null);
|
|
122
123
|
};
|
|
123
|
-
// Loading app metadata
|
|
124
124
|
useEffect(() => {
|
|
125
|
-
fetchProducts(dispatchToGlobalMetadataReducer,
|
|
126
|
-
|
|
127
|
-
}, [contactSSOName, dispatchToGlobalMetadataReducer]);
|
|
125
|
+
fetchProducts(dispatchToGlobalMetadataReducer, apolloClient);
|
|
126
|
+
}, [dispatchToGlobalMetadataReducer, apolloClient]);
|
|
128
127
|
return (React.createElement(React.Fragment, null,
|
|
129
128
|
React.createElement(GlobalTroubleshootEffects, { routeProps: props.routeProps }),
|
|
130
129
|
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":"AAcA,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,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACzD,UAAU,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC3C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,mBAAmB,EAAE,CAAC,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;IACzE,gBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,0BAA0B,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAC5E,kCAAkC,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACpF,qCAAqC,CAAC,EAAE,OAAO,CAAC;IAChD,gCAAgC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACjF,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,oBAAoB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACrE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;IACpC,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACjC;AAGD,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBA8atC;kBA9aQ,gBAAgB;;;AAgbzB,eAAe,gBAAgB,CAAC"}
|
|
@@ -12,7 +12,6 @@ import { Button, ButtonVariant, WizardFooterWrapper } from '@patternfly/react-co
|
|
|
12
12
|
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';
|
|
16
15
|
import isEmpty from 'lodash/isEmpty';
|
|
17
16
|
import isEqual from 'lodash/isEqual';
|
|
18
17
|
import React, { useContext, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
@@ -32,14 +31,15 @@ import { RecommendationFeedbackModal } from '../Recommendations/RecommendationFe
|
|
|
32
31
|
import { useIsSectionValid } from '../shared/useIsSectionValid';
|
|
33
32
|
const defaultProps = {};
|
|
34
33
|
function WizardNavigation(props) {
|
|
35
|
-
var _a, _b;
|
|
36
34
|
const { t } = useTranslation();
|
|
37
35
|
const { isVariationA } = useAB();
|
|
38
36
|
const canCreateCase = useCanCreateCase();
|
|
39
37
|
const { recommendationState } = useContext(RecommendationStateContext);
|
|
40
38
|
const aiResponseState = useAIResponseState();
|
|
41
|
-
const { routeState: { activeSection, isNextBtnClickedToShowValidationError,
|
|
42
|
-
|
|
39
|
+
const { routeState: { activeSection, isNextBtnClickedToShowValidationError,
|
|
40
|
+
// noValidEntitlement,
|
|
41
|
+
isCaseCreate, }, } = useContext(RouteContext);
|
|
42
|
+
const { globalMetadataState: { loggedInUsersAccount, 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,8 +49,11 @@ function WizardNavigation(props) {
|
|
|
49
49
|
caseType: state.caseDetails.caseType,
|
|
50
50
|
manageSupportCases: state.selectedOwner.data.manageSupportCases,
|
|
51
51
|
}), isEqual);
|
|
52
|
-
//
|
|
53
|
-
const isEntitledProduct =
|
|
52
|
+
// isEntitledProduct — commented out; product-level entitlement now resolved from SFDCProductJSON__c
|
|
53
|
+
// const isEntitledProduct = find(
|
|
54
|
+
// allProducts?.data?.productsResult,
|
|
55
|
+
// (p) => p.product === caseState.caseDetails.product
|
|
56
|
+
// )?.isEntitledProduct;
|
|
54
57
|
const dispatchToRouteReducer = useContext(RouteDispatchContext);
|
|
55
58
|
const { activeSectionError, isSectionValidFn } = useIsSectionValid(activeSection);
|
|
56
59
|
const [isRecsModalVisible, setIsRecsModalVisible] = useState(false);
|
|
@@ -251,7 +254,6 @@ function WizardNavigation(props) {
|
|
|
251
254
|
}
|
|
252
255
|
catch (e) { }
|
|
253
256
|
});
|
|
254
|
-
const isEntitledProductLocal = isSearchIntent ? true : isEntitledProduct;
|
|
255
257
|
const nextButtonDisabledLogic = () => {
|
|
256
258
|
const isLoadingARH = props.isLoadingARH &&
|
|
257
259
|
props.activeStep.id === AppRouteSections.RESOURCES &&
|
|
@@ -263,10 +265,9 @@ function WizardNavigation(props) {
|
|
|
263
265
|
let value = isLoadingARH ||
|
|
264
266
|
((isEmpty(summary) || isEmpty(issue) || isEmpty(product) || isEmpty(version)) &&
|
|
265
267
|
props.activeStep.id === (isCaseCreate ? AppRouteSections.SUMMARIZE : AppRouteSections.TROUBLESHOOT)) ||
|
|
266
|
-
(!isEntitledProductLocal && props.activeStep.nextButtonLabel === 'Get support') ||
|
|
267
268
|
props.activeStep.nextButtonLabel === 'Troubleshoot' ||
|
|
268
269
|
(isSectionValidFn && !isSectionValidFn(props.activeStep.id) && isNextBtnClickedToShowValidationError) ||
|
|
269
|
-
noValidEntitlement ||
|
|
270
|
+
// noValidEntitlement ||
|
|
270
271
|
isLoadingRecs;
|
|
271
272
|
return value;
|
|
272
273
|
};
|
|
@@ -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":"AAcA,wBAAgB,kBAAkB;;EAiCjC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { fetchLoggedInUser, fetchLoggedInUsersAccount, GlobalMetadataDispatchContext, GlobalMetadataStateContext, } from '@rh-support/react-context';
|
|
2
1
|
import { useContext } from 'react';
|
|
3
2
|
import { AttachmentDispatchContext, resetAttachment } from '../components/shared/fileUpload';
|
|
4
3
|
import { useCaseDispatch } from '../context/CaseContext';
|
|
@@ -7,7 +6,6 @@ import { useRecommendationDispatchContext } from '../context/RecommendationConte
|
|
|
7
6
|
import { RulesDispatchContext } from '../context/RulesContext';
|
|
8
7
|
import { TCDispatchContext } from '../context/TopContentContext';
|
|
9
8
|
import { CaseReducerConstants } from '../reducers/CaseConstNTypes';
|
|
10
|
-
import { setCaseAccountNumber, setCaseOwner } from '../reducers/CaseReducer';
|
|
11
9
|
import { resetClusterRecommendations } from '../reducers/ClusterRecommendationsReducer';
|
|
12
10
|
import { resetRecommendations } from '../reducers/RecommendationsReducer';
|
|
13
11
|
import { resetEARules } from '../reducers/RulesReducer';
|
|
@@ -17,22 +15,26 @@ export function useResetCaseCreate() {
|
|
|
17
15
|
const tcDispatch = useContext(TCDispatchContext);
|
|
18
16
|
const recommendationsDispatch = useRecommendationDispatchContext();
|
|
19
17
|
const caseDispatch = useCaseDispatch();
|
|
20
|
-
const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
|
|
21
18
|
const rulesDispatch = useContext(RulesDispatchContext);
|
|
22
19
|
const clusterRecommendationsDispatch = useContext(ClusterRecommendationsDispatchContext);
|
|
23
|
-
const { globalMetadataState: { loggedInUsersAccount, loggedInUserRights, loggedInUserJwtToken }, } = useContext(GlobalMetadataStateContext);
|
|
24
20
|
const resetCaseCreateState = () => {
|
|
25
|
-
//
|
|
26
|
-
fetchLoggedInUser(dispatchToGlobalMetadataReducer, loggedInUserJwtToken, {});
|
|
21
|
+
// Commented out — don't refetch logged-in user contact details on case creation
|
|
22
|
+
// fetchLoggedInUser(dispatchToGlobalMetadataReducer, loggedInUserJwtToken, {});
|
|
27
23
|
resetAttachment(dispatchToAttachmentReducer);
|
|
28
24
|
resetTopContent(tcDispatch);
|
|
29
25
|
resetRecommendations(recommendationsDispatch);
|
|
30
26
|
caseDispatch({ type: CaseReducerConstants.resetCaseState });
|
|
31
|
-
//
|
|
32
|
-
//
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
// Commented out — don't refetch account details or auto-populate account/owner on case creation
|
|
28
|
+
// fetchLoggedInUsersAccount(dispatchToGlobalMetadataReducer, loggedInUserJwtToken, true, apolloClient);
|
|
29
|
+
// setCaseAccountNumber(caseDispatch, loggedInUserRights.data.getAccountNumber(), true, loggedInUsersAccount.data);
|
|
30
|
+
// setCaseOwner(
|
|
31
|
+
// caseDispatch,
|
|
32
|
+
// loggedInUserRights.data.getHydraContactFromLoggedInUser(),
|
|
33
|
+
// '',
|
|
34
|
+
// undefined,
|
|
35
|
+
// undefined,
|
|
36
|
+
// true
|
|
37
|
+
// );
|
|
36
38
|
resetEARules(rulesDispatch);
|
|
37
39
|
resetClusterRecommendations(clusterRecommendationsDispatch);
|
|
38
40
|
};
|
|
@@ -6,6 +6,7 @@ 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';
|
|
9
10
|
import { Dispatch } from 'react';
|
|
10
11
|
import { ICVEWorkflowRecommendation } from '../models/caseCreationWorkflows';
|
|
11
12
|
export declare const TITLE_SUMMARY_LENGTH_LIMIT = 255;
|
|
@@ -236,6 +237,27 @@ export interface ICaseState {
|
|
|
236
237
|
isCveModalOpened?: boolean;
|
|
237
238
|
ABTestVariation?: string;
|
|
238
239
|
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;
|
|
239
261
|
}
|
|
240
262
|
export interface ICreateCasePayloadType extends ICaseState {
|
|
241
263
|
}
|
|
@@ -243,6 +265,7 @@ export type ICaseActionType = IAction<CaseReducerConstants, ICreateCasePayloadTy
|
|
|
243
265
|
export type CaseReducerDispatchType = Dispatch<ICaseActionType>;
|
|
244
266
|
export declare const ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = "https://access.redhat.com/articles/5967811";
|
|
245
267
|
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>;
|
|
246
269
|
export declare const excludedCaseTypesforARH: string[];
|
|
247
270
|
export declare const appSourceId_ARH = "PCM-001";
|
|
248
271
|
//# sourceMappingURL=CaseConstNTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseConstNTypes.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseConstNTypes.ts"],"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uBAAuB,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;AAEhE,eAAO,MAAM,qCAAqC,+CAA+C,CAAC;AAClG,eAAO,MAAM,yCAAyC,+CAA+C,CAAC;AAEtG,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAA6C,CAAC;AAE9F,eAAO,MAAM,uBAAuB,UAAoC,CAAC;AACzE,eAAO,MAAM,eAAe,YAAY,CAAC"}
|
|
@@ -231,8 +231,13 @@ 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,
|
|
234
238
|
};
|
|
235
239
|
export const ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = 'https://access.redhat.com/articles/5967811';
|
|
236
240
|
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' };
|
|
237
242
|
export const excludedCaseTypesforARH = ['Feature / Enhancement Request'];
|
|
238
243
|
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 } from './CaseConstNTypes';
|
|
9
|
+
import { ICaseState, IGraphQLCasePayload } 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,6 +21,7 @@ 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;
|
|
24
25
|
export declare const createCasePayload: (caseState: ICaseState, sessionItem?: ISessionItem, isCaseCreate?: boolean) => Partial<ICasePayload>;
|
|
25
26
|
export declare const getProcessedEntitlements: (caseEntitlements: IEntitlement[]) => IEntitlement[];
|
|
26
27
|
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":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a,OAAO,CAAC,YAAY,CAAC,EAClC,8BAA8B,QAAQ,EAAE,KACzC,eAiDF,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getAppVersion, getUserAgentForCaseMode, getVersion, isPremiumEntitlement, showFtsOnCreateCasePage, } from '@rh-support/utils';
|
|
1
|
+
import { getAppVersion, getTechnicalSupportRecordTypeId, 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, 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';
|
|
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, LANGUAGE_MAP, 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,6 +225,43 @@ 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
|
+
};
|
|
228
265
|
export const createCasePayload = (caseState, sessionItem, isCaseCreate = false) => {
|
|
229
266
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
230
267
|
const casePayload = {};
|
|
@@ -29,7 +29,9 @@ 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,
|
|
32
|
+
export declare const fetchAllStatuses: (dispatch: CaseDetailsReducerDispatchType, apolloClient: {
|
|
33
|
+
query: (options: any) => Promise<any>;
|
|
34
|
+
}) => Promise<void>;
|
|
33
35
|
export declare const fetchCaseHydra: (dispatch: CaseDetailsReducerDispatchType, caseNumber: string) => Promise<void>;
|
|
34
36
|
export {};
|
|
35
37
|
//# sourceMappingURL=CaseOverviewReducer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseOverviewReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseOverviewReducer.ts"],"names":[],"mappings":"AACA,OAAO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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,GACzB,UAAU,8BAA8B,EACxC,cAAc;IAAE,KAAK,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;CAAE,kBAoB1D,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 {
|
|
11
|
-
import { getApiResourceObject } from '@rh-support/utils';
|
|
10
|
+
import { fields, kase } from '@cee-eng/hydrajs';
|
|
11
|
+
import { buildPicklistInput, fetchPicklistValues, getApiResourceObject } from '@rh-support/utils';
|
|
12
12
|
export var CaseDetailsConstants;
|
|
13
13
|
(function (CaseDetailsConstants) {
|
|
14
14
|
CaseDetailsConstants["setSelectedValue"] = "setSelectedValue";
|
|
@@ -66,16 +66,18 @@ 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,
|
|
69
|
+
export const fetchAllStatuses = (dispatch, apolloClient) => __awaiter(void 0, void 0, void 0, function* () {
|
|
70
|
+
var _a;
|
|
70
71
|
dispatch({
|
|
71
72
|
type: CaseDetailsConstants.getCaseStatuses,
|
|
72
73
|
payload: { allCaseStatuses: getApiResourceObject([], true) },
|
|
73
74
|
});
|
|
74
75
|
try {
|
|
75
|
-
const
|
|
76
|
+
const picklists = yield fetchPicklistValues(apolloClient, buildPicklistInput(['Status']));
|
|
77
|
+
const allCaseStatuses = (_a = picklists.Status) !== null && _a !== void 0 ? _a : [];
|
|
76
78
|
dispatch({
|
|
77
79
|
type: CaseDetailsConstants.getCaseStatuses,
|
|
78
|
-
payload: { allCaseStatuses: getApiResourceObject(
|
|
80
|
+
payload: { allCaseStatuses: getApiResourceObject(allCaseStatuses) },
|
|
79
81
|
});
|
|
80
82
|
}
|
|
81
83
|
catch (e) {
|
|
@@ -12,7 +12,9 @@ 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
|
|
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, apolloClient?: {
|
|
16
|
+
mutate: (options: any) => Promise<any>;
|
|
17
|
+
}) => Promise<void>;
|
|
16
18
|
/**
|
|
17
19
|
* Update case details if there is HTTP 500 error while submitting case
|
|
18
20
|
* @param dispatch CaseReducerDispatchType
|
|
@@ -35,13 +37,19 @@ export declare const submitNotifiedUser: (dispatch: CaseReducerDispatchType, cas
|
|
|
35
37
|
export declare const deleteNotifiedUsers: (dispatch: CaseReducerDispatchType, caseNumber: string, ssoUsernames: string[]) => Promise<void>;
|
|
36
38
|
export declare const addingNotifiedUsers: (dispatch: CaseReducerDispatchType, caseNumber: string, addedUsers: IContact[]) => Promise<void>;
|
|
37
39
|
export declare const clearSelectedAccount: (dispatch: CaseReducerDispatchType) => void;
|
|
38
|
-
export declare const setCaseAccountNumber: (dispatch: CaseReducerDispatchType, accountNumber: string, isLoggedInUsersAccount?: boolean, loggedInUserAccount?: Partial<IAccount
|
|
40
|
+
export declare const setCaseAccountNumber: (dispatch: CaseReducerDispatchType, accountNumber: string, isLoggedInUsersAccount?: boolean, loggedInUserAccount?: Partial<IAccount>, apolloClient?: {
|
|
41
|
+
query: (options: any) => Promise<any>;
|
|
42
|
+
}) => Promise<void>;
|
|
39
43
|
export declare const fetchCaseGroupsForAccount: (dispatch: CaseReducerDispatchType, accountNumber: string, setCaseGroupToUngroupedOrDefault?: boolean, abortSignal?: AbortSignal, caseGroupNumberToRestore?: string | undefined) => Promise<void>;
|
|
40
44
|
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>;
|
|
41
45
|
export declare const fetchCaseEntitlements: (dispatch: CaseReducerDispatchType, ssoUserName: string, product?: string, abortSignal?: AbortSignal, isUserUpdate?: boolean, caseNumber?: string) => Promise<void>;
|
|
42
46
|
export declare const fetchCaseGroupsForSSO: (dispatch: CaseReducerDispatchType, contactSsoUsername: string, setCaseGroupToUngroupedOrDefault?: boolean, abortSignal?: AbortSignal, caseGroupNumberToRestore?: string | undefined) => Promise<void>;
|
|
43
|
-
export declare const updateCaseWithSession: (dispatch: CaseReducerDispatchType, sessionItem: ISessionItem, loggedInUserAccountNumber: string, loggedInUserContact: IContact, loggedInUserAccount?: Partial<IAccount
|
|
44
|
-
|
|
47
|
+
export declare const updateCaseWithSession: (dispatch: CaseReducerDispatchType, sessionItem: ISessionItem, loggedInUserAccountNumber: string, loggedInUserContact: IContact, loggedInUserAccount?: Partial<IAccount>, apolloClient?: {
|
|
48
|
+
query: (options: any) => Promise<any>;
|
|
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>;
|
|
45
53
|
export declare const updateCaseDetails: (dispatch: CaseReducerDispatchType, caseNumber: string, caseDetails: Partial<ICasePayload>, dontSetDetails?: boolean) => Promise<never>;
|
|
46
54
|
export declare const getNotificationContacts4InternalUser: (dispatch: CaseReducerDispatchType, users: INotifiedUser[], caseOwnerSSO: string) => Promise<void>;
|
|
47
55
|
export declare const getNotificationContacts4ExternalUser: (dispatch: CaseReducerDispatchType, users: any, loggedInUserRights: any, accountNumber: any, caseOwnerSSO: string, fullNameCustom: string) => Promise<void>;
|
|
@@ -49,7 +57,9 @@ export declare const checkForCaseStatusToggleOnAttachOrComment: (dispatch: CaseR
|
|
|
49
57
|
export declare const setSelectedCaseGroupUsers: (dispatch: CaseReducerDispatchType, accountNumber: string, groupNumber: string, loggedInUserRights: UserAuth) => Promise<void>;
|
|
50
58
|
export declare function getCustomNotificationEmails(dispatch: CaseReducerDispatchType, caseNumber: string): Promise<void>;
|
|
51
59
|
export declare function updateEmailListState(dispatch: CaseReducerDispatchType, email: string, customEmailsList: IApiResponseDetails<Partial<ICaseNotificationAddresses[]>>, callback: (email: string) => ICaseNotificationAddresses[]): void;
|
|
52
|
-
export declare function getVersionsDetails(dispatch: CaseReducerDispatchType,
|
|
60
|
+
export declare function getVersionsDetails(dispatch: CaseReducerDispatchType, apolloClient: {
|
|
61
|
+
query: (options: any) => Promise<any>;
|
|
62
|
+
}, parentProductId: string, parentProductName: string): Promise<void>;
|
|
53
63
|
export declare const setRemoteRiderFlag: (dispatch: CaseReducerDispatchType, flag: boolean) => void;
|
|
54
64
|
export declare const setABTestVariation: (dispatch: CaseReducerDispatchType, ABTestVariation: string) => void;
|
|
55
65
|
//# 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":"AAEA,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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