@rh-support/troubleshoot 2.0.6 → 2.0.7
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 +44 -5
- package/lib/esm/components/AccountInfo/OwnerSelector.js +2 -2
- package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +5 -3
- package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +38 -36
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts +2 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +4 -3
- package/lib/esm/components/CaseEditView/CaseSolutions/HandpickedItem.d.ts +12 -0
- package/lib/esm/components/CaseEditView/CaseSolutions/HandpickedItem.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/CaseSolutions/HandpickedItem.js +14 -0
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +1 -1
- package/lib/esm/components/CaseEditView/ShareCase/PartnerShare.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ShareCase/PartnerShare.js +6 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +1 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/useCustomEmails.js +1 -1
- package/lib/esm/components/CaseInformation/CaseGroup.js +2 -2
- package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseInformation.js +1 -8
- package/lib/esm/components/CaseInformation/Description.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Description.js +4 -2
- package/lib/esm/components/CaseInformation/OpenCaseIssue.js +2 -2
- package/lib/esm/components/CaseInformation/Severity.js +1 -1
- package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseManagement.js +2 -9
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.d.ts +5 -1
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +7 -7
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +4 -1
- package/lib/esm/components/IdeaInformation/IdeaInformtion.d.ts.map +1 -1
- package/lib/esm/components/IdeaInformation/IdeaInformtion.js +1 -8
- package/lib/esm/components/ImproveCase/KtQuestions.js +2 -2
- package/lib/esm/components/Issue/Issue.d.ts.map +1 -1
- package/lib/esm/components/Issue/Issue.js +1 -2
- package/lib/esm/components/OpenCase/OpenCase.d.ts.map +1 -1
- package/lib/esm/components/OpenCase/OpenCase.js +2 -9
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +2 -2
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +3 -3
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts +1 -1
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +3 -3
- package/lib/esm/components/ProductSelector/ProductSelector.js +1 -2
- package/lib/esm/components/ProductSelector/ProductSelectorLoader.d.ts +1 -2
- package/lib/esm/components/ProductSelector/ProductSelectorLoader.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductSelectorLoader.js +12 -19
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +3 -3
- package/lib/esm/components/Recommendations/ClusterRecommendationToast.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendationToast.js +2 -1
- package/lib/esm/components/Recommendations/ClusterRecommendations.js +1 -1
- package/lib/esm/components/SessionRestore/RestoreLastSessionModal.js +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.js +4 -9
- package/lib/esm/components/SubmitCase/ResubmitToast.js +1 -1
- package/lib/esm/components/SubmitCase/SubmitCase.js +1 -1
- package/lib/esm/components/Suggestions/TopContent.js +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +2 -2
- package/lib/esm/components/shared/useIsSectionValid.d.ts +1 -1
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +5 -24
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +40 -80
- package/lib/esm/components/wizardLayout/MainSection.d.ts +5 -3
- package/lib/esm/components/wizardLayout/MainSection.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/MainSection.js +4 -4
- package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardAside.js +3 -10
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +31 -42
- package/lib/esm/components/wizardLayout/WizardMain.d.ts +2 -3
- package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardMain.js +43 -163
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts +7 -3
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +46 -90
- package/lib/esm/components/wizardLayout/index.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/index.js +2 -10
- package/lib/esm/context/RootTroubleshootProvider.d.ts.map +1 -1
- package/lib/esm/context/RootTroubleshootProvider.js +7 -9
- package/lib/esm/css/app.css +0 -450
- package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
- package/lib/esm/hooks/useResetCaseCreate.js +0 -4
- package/lib/esm/hooks/useWizard.d.ts +4 -0
- package/lib/esm/hooks/useWizard.d.ts.map +1 -0
- package/lib/esm/hooks/useWizard.js +128 -0
- package/lib/esm/reducers/RouteConstNTypes.d.ts +21 -1
- package/lib/esm/reducers/RouteConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/RouteConstNTypes.js +43 -0
- package/lib/esm/reducers/RouteReducer.d.ts +13 -47
- package/lib/esm/reducers/RouteReducer.d.ts.map +1 -1
- package/lib/esm/reducers/RouteReducer.js +36 -165
- package/lib/esm/scss/_main.scss +107 -787
- package/lib/esm/utils/routeUtils.d.ts +3 -9
- package/lib/esm/utils/routeUtils.d.ts.map +1 -1
- package/lib/esm/utils/routeUtils.js +14 -41
- package/package.json +14 -25
- package/lib/esm/components/wizardLayout/WizardProgress.d.ts +0 -13
- package/lib/esm/components/wizardLayout/WizardProgress.d.ts.map +0 -1
- package/lib/esm/components/wizardLayout/WizardProgress.js +0 -108
- package/lib/esm/context/AppMetadataContext.d.ts +0 -11
- package/lib/esm/context/AppMetadataContext.d.ts.map +0 -1
- package/lib/esm/context/AppMetadataContext.js +0 -13
- package/lib/esm/reducers/AppMetadataReducer.d.ts +0 -28
- package/lib/esm/reducers/AppMetadataReducer.d.ts.map +0 -1
- package/lib/esm/reducers/AppMetadataReducer.js +0 -28
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Flex, FlexItem } from '@patternfly/react-core';
|
|
2
|
-
import React
|
|
3
|
-
import { AppMetadataStateContext } from '../../context/AppMetadataContext';
|
|
2
|
+
import React from 'react';
|
|
4
3
|
import { useCaseDispatch } from '../../context/CaseContext';
|
|
5
4
|
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
6
5
|
import CaseGroup from '../CaseInformation/CaseGroup';
|
|
@@ -16,16 +15,10 @@ import { RHAssociatesSelector } from './RHAssociatesSelector';
|
|
|
16
15
|
import CaseContactSelector from './SendNotifications/CaseContactSelector';
|
|
17
16
|
export default function CaseManagement(props) {
|
|
18
17
|
const caseDispatch = useCaseDispatch();
|
|
19
|
-
const { appMetadataState: { nextButtonRef }, } = useContext(AppMetadataStateContext);
|
|
20
|
-
const handleFormSubmit = (e) => {
|
|
21
|
-
e.preventDefault();
|
|
22
|
-
// simulating click
|
|
23
|
-
nextButtonRef.current.click();
|
|
24
|
-
};
|
|
25
18
|
const onSeverityChange = (payload) => {
|
|
26
19
|
setCaseDetails(caseDispatch, payload);
|
|
27
20
|
};
|
|
28
|
-
return (React.createElement("form",
|
|
21
|
+
return (React.createElement("form", null,
|
|
29
22
|
React.createElement(SupportLevel, null),
|
|
30
23
|
React.createElement(Flex, { direction: { default: 'column', '2xl': 'row' } },
|
|
31
24
|
React.createElement(FlexItem, { flex: { default: 'flex_1' } },
|
|
@@ -2,5 +2,9 @@ export declare const v3Tov4TransitionLink: () => JSX.Element;
|
|
|
2
2
|
export declare const discoverV4ClusterIdLink: () => JSX.Element;
|
|
3
3
|
export declare const discoverV4ClusterIdLinkError: () => JSX.Element;
|
|
4
4
|
export declare const isInvalidErrorMessage: () => JSX.Element;
|
|
5
|
-
|
|
5
|
+
interface IProps {
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function OpenShiftClusterId(props: IProps): JSX.Element;
|
|
9
|
+
export {};
|
|
6
10
|
//# sourceMappingURL=OpenShiftClusterId.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenShiftClusterId.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/OpenShiftClusterId.tsx"],"names":[],"mappings":"AA2BA,eAAO,MAAM,oBAAoB,mBAShC,CAAC;AAEF,eAAO,MAAM,uBAAuB,mBAInC,CAAC;AAEF,eAAO,MAAM,4BAA4B,mBAUxC,CAAC;AAEF,eAAO,MAAM,qBAAqB,mBAIjC,CAAC;AAEF,wBAAgB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"OpenShiftClusterId.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/OpenShiftClusterId.tsx"],"names":[],"mappings":"AA2BA,eAAO,MAAM,oBAAoB,mBAShC,CAAC;AAEF,eAAO,MAAM,uBAAuB,mBAInC,CAAC;AAEF,eAAO,MAAM,4BAA4B,mBAUxC,CAAC;AAEF,eAAO,MAAM,qBAAqB,mBAIjC,CAAC;AAEF,UAAU,MAAM;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,eAyR/C"}
|
|
@@ -37,7 +37,7 @@ export const isInvalidErrorMessage = () => (React.createElement(React.Fragment,
|
|
|
37
37
|
React.createElement(Trans, null,
|
|
38
38
|
"Cluster Id is not valid. ",
|
|
39
39
|
discoverV4ClusterIdLink())));
|
|
40
|
-
export function OpenShiftClusterId() {
|
|
40
|
+
export function OpenShiftClusterId(props) {
|
|
41
41
|
const queryParams = getUrlParsedParams(useLocation().search);
|
|
42
42
|
const { openshiftClusterID, product, version, issue, environment, periodicityOfIssue, timeFramesAndUrgency, noClusterIdReason, noClusterIdReasonExplanation, v3ClusterName, openshiftDisplayName, selectedAccountDetails, } = useCaseSelector((state) => ({
|
|
43
43
|
openshiftClusterID: state.caseDetails.openshiftClusterID,
|
|
@@ -55,7 +55,7 @@ export function OpenShiftClusterId() {
|
|
|
55
55
|
}), isEqual);
|
|
56
56
|
const caseDispatch = useCaseDispatch();
|
|
57
57
|
const { globalMetadataState: { allProducts, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
58
|
-
const { routeState: {
|
|
58
|
+
const { routeState: { isNextBtnClickedToShowValidationError }, } = useContext(RouteContext);
|
|
59
59
|
const clusterRecommendationsDispatch = useContext(ClusterRecommendationsDispatchContext);
|
|
60
60
|
const { clusterRecommendationsState: { clusterRecommendationsCache }, } = useContext(ClusterRecommendationsContext);
|
|
61
61
|
const majorVersion = (version && getVersion(version).major) || '';
|
|
@@ -185,7 +185,7 @@ export function OpenShiftClusterId() {
|
|
|
185
185
|
? discoverV4ClusterIdLinkError()
|
|
186
186
|
: null;
|
|
187
187
|
const infoMessage = v3Selected ? v3Tov4TransitionLink() : discoverV4ClusterIdLink();
|
|
188
|
-
return
|
|
188
|
+
return isNextBtnClickedToShowValidationError && errorMessage ? errorMessage : infoMessage;
|
|
189
189
|
};
|
|
190
190
|
const onReasonExplanationInputBoxChanged = (noClusterIdReasonExplanation) => {
|
|
191
191
|
if (noClusterIdReason === 'Other') {
|
|
@@ -203,13 +203,13 @@ export function OpenShiftClusterId() {
|
|
|
203
203
|
const onReasonChange = (reason) => {
|
|
204
204
|
setCaseDetails(caseDispatch, { noClusterIdReason: reason });
|
|
205
205
|
};
|
|
206
|
-
const isInVaidNoClusterIdReason =
|
|
206
|
+
const isInVaidNoClusterIdReason = isNextBtnClickedToShowValidationError &&
|
|
207
207
|
(isEmpty(noClusterIdReason) || (noClusterIdReason === 'Other' && isEmpty(noClusterIdReasonExplanation.trim())));
|
|
208
208
|
if (!showClusterId)
|
|
209
209
|
return null;
|
|
210
|
-
return (React.createElement(
|
|
211
|
-
!isOpenShiftV3 && (React.createElement(OpenshiftDropdownV4, { openshiftDisplayName: openshiftDisplayName, openshiftClusterIDState: openshiftClusterID || selectedReason, onClusterIdStateUpdate: onClusterIdStateUpdate, isClusterIdInvalid:
|
|
210
|
+
return (React.createElement("div", { className: `${props.className ? props.className : ''}` },
|
|
211
|
+
!isOpenShiftV3 && (React.createElement(OpenshiftDropdownV4, { openshiftDisplayName: openshiftDisplayName, openshiftClusterIDState: openshiftClusterID || selectedReason, onClusterIdStateUpdate: onClusterIdStateUpdate, isClusterIdInvalid: isNextBtnClickedToShowValidationError &&
|
|
212
212
|
((isEmpty(openshiftClusterID) && isEmpty(selectedReason)) || isClusterIdInvalid), clusterIdDropdownFormInstructions: clusterIdDropdownFormInstructions(), onClusterClear: resetClusterData, isV3: product !== 'OpenShift Container Platform' })),
|
|
213
213
|
noClusterIdReasonExplanation !== 'v3-cluster' && dontKnowSelected && !isOpenShiftV3 && (React.createElement(NoClusterIDReasonSelector, { noClusterIdReasonExplanation: noClusterIdReasonExplanation, noClusterIdReason: noClusterIdReason, onReasonInputBoxChanged: onReasonExplanationInputBoxChanged, onReasonChange: onReasonChange, isInValid: isInVaidNoClusterIdReason, isCustomer: isCustomer })),
|
|
214
|
-
(v3Selected || isOpenShiftV3) && (React.createElement(OpenShiftV3Inputbox, { v3ClusterName: v3ClusterName, onReasonInputBoxChanged: v3ClusterNameInputBoxChanged, isInValid: isEmpty(v3ClusterName.trim()) &&
|
|
214
|
+
(v3Selected || isOpenShiftV3) && (React.createElement(OpenShiftV3Inputbox, { v3ClusterName: v3ClusterName, onReasonInputBoxChanged: v3ClusterNameInputBoxChanged, isInValid: isEmpty(v3ClusterName.trim()) && isNextBtnClickedToShowValidationError, v3Selected: v3Selected }))));
|
|
215
215
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseContactSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/CaseContactSelector.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseContactSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/CaseContactSelector.tsx"],"names":[],"mappings":"AAuCA,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,eA6azC;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -11,10 +11,13 @@ import { Button, Tooltip, TooltipPosition } from '@patternfly/react-core';
|
|
|
11
11
|
import { CaseContactsSelectorExternal, getHydraContactLabel, PromisifyModal, ToastNotification, usePrevious, } from '@rh-support/components';
|
|
12
12
|
import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
|
|
13
13
|
import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
14
|
-
import { filter, find, map, remove } from 'lodash';
|
|
15
14
|
import differenceBy from 'lodash/differenceBy';
|
|
15
|
+
import filter from 'lodash/filter';
|
|
16
|
+
import find from 'lodash/find';
|
|
16
17
|
import isEmpty from 'lodash/isEmpty';
|
|
17
18
|
import isEqual from 'lodash/isEqual';
|
|
19
|
+
import map from 'lodash/map';
|
|
20
|
+
import remove from 'lodash/remove';
|
|
18
21
|
import uniqBy from 'lodash/uniqBy';
|
|
19
22
|
import xor from 'lodash/xor';
|
|
20
23
|
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdeaInformtion.d.ts","sourceRoot":"","sources":["../../../../src/components/IdeaInformation/IdeaInformtion.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IdeaInformtion.d.ts","sourceRoot":"","sources":["../../../../src/components/IdeaInformation/IdeaInformtion.tsx"],"names":[],"mappings":"AA8BA,MAAM,CAAC,OAAO,UAAU,eAAe,gBAsItC"}
|
|
@@ -6,7 +6,6 @@ import isEmpty from 'lodash/isEmpty';
|
|
|
6
6
|
import isEqual from 'lodash/isEqual';
|
|
7
7
|
import React, { useContext, useEffect } from 'react';
|
|
8
8
|
import { Trans, useTranslation } from 'react-i18next';
|
|
9
|
-
import { AppMetadataStateContext } from '../../context/AppMetadataContext';
|
|
10
9
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
11
10
|
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
12
11
|
import CaseGroup from '../CaseInformation/CaseGroup';
|
|
@@ -23,7 +22,6 @@ import CaseContactSelector from '../CaseManagement/SendNotifications/CaseContact
|
|
|
23
22
|
import KtQuestions from '../ImproveCase/KtQuestions';
|
|
24
23
|
export default function IdeaInformation() {
|
|
25
24
|
const { t } = useTranslation();
|
|
26
|
-
const { appMetadataState: { nextButtonRef }, } = useContext(AppMetadataStateContext);
|
|
27
25
|
const { globalMetadataState: { allCaseTypes, allCaseSeverities, caseLanguages, loggedInUser, loggedInUserJwtToken, loggedInUsersAccount, }, } = useContext(GlobalMetadataStateContext);
|
|
28
26
|
const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
|
|
29
27
|
const { contactSSOName, selectedAccountDetails, ownersCaseGroups, hasInvalidEntitlements } = useCaseSelector((state) => ({
|
|
@@ -43,11 +41,6 @@ export default function IdeaInformation() {
|
|
|
43
41
|
(selectedAccountDetails.data.requireCGroupOnCreate && ownersCaseGroups.isError) ||
|
|
44
42
|
allCaseSeverities.isError);
|
|
45
43
|
};
|
|
46
|
-
const handleFormSubmit = (e) => {
|
|
47
|
-
e.preventDefault();
|
|
48
|
-
// simulating click
|
|
49
|
-
nextButtonRef.current.click();
|
|
50
|
-
};
|
|
51
44
|
// Loading metadata (if needed) on component mount after fetching account info.
|
|
52
45
|
// This will be fetched here in caseCreation mode as Issue section will be skipped.
|
|
53
46
|
useEffect(() => {
|
|
@@ -97,7 +90,7 @@ export default function IdeaInformation() {
|
|
|
97
90
|
!isMetadataLoading() &&
|
|
98
91
|
!isMetadataLoadingError() &&
|
|
99
92
|
canManageCase(loggedInUserJwtToken) && (React.createElement(React.Fragment, null,
|
|
100
|
-
React.createElement("form",
|
|
93
|
+
React.createElement("form", null,
|
|
101
94
|
React.createElement(Description, { inlineEditable: false, customTitle: t('Please describe your request') }),
|
|
102
95
|
React.createElement(KtQuestions, { onlyShowKT4: true }),
|
|
103
96
|
React.createElement(SupportLevel, null),
|
|
@@ -49,7 +49,7 @@ function KtQuestions(props) {
|
|
|
49
49
|
const onCaseDetailsChange = (caseDetails) => {
|
|
50
50
|
setCaseDetails(caseDispatch, caseDetails);
|
|
51
51
|
};
|
|
52
|
-
const { routeState: {
|
|
52
|
+
const { routeState: { isNextBtnClickedToShowValidationError }, } = useContext(RouteContext);
|
|
53
53
|
// Troubleshoot Page Question 3
|
|
54
54
|
const onKtQ2Change = (value, e) => {
|
|
55
55
|
const ktQ2Local = isEmpty(value === null || value === void 0 ? void 0 : value.trim()) ? '' : value;
|
|
@@ -85,7 +85,7 @@ function KtQuestions(props) {
|
|
|
85
85
|
' ',
|
|
86
86
|
isKT4Required && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))), allowInlineEdit: props.inlineEditable, hideSaveCancel: props.hideSaveCancel, initialIsEditing: isEmpty(timeFramesAndUrgency), usePreformattedTag: true, saveOnBlur: true, content: timeFramesAndUrgency },
|
|
87
87
|
React.createElement(TextArea, { className: `form-control${invalidateQT4(timeFramesAndUrgency) ||
|
|
88
|
-
(
|
|
88
|
+
(isNextBtnClickedToShowValidationError && isEmpty(timeFramesAndUrgency)) ||
|
|
89
89
|
isKTQ4InValid
|
|
90
90
|
? ' form-invalid'
|
|
91
91
|
: ''}`, "aria-invalid": timeFramesAndUrgency && (timeFramesAndUrgency === null || timeFramesAndUrgency === void 0 ? void 0 : timeFramesAndUrgency.length) > CASE_DETAILS_TIMEFRAMESANDURGENCY_LIMIT
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Issue.d.ts","sourceRoot":"","sources":["../../../../src/components/Issue/Issue.tsx"],"names":[],"mappings":"AAmBA,MAAM,CAAC,OAAO,UAAU,KAAK,
|
|
1
|
+
{"version":3,"file":"Issue.d.ts","sourceRoot":"","sources":["../../../../src/components/Issue/Issue.tsx"],"names":[],"mappings":"AAmBA,MAAM,CAAC,OAAO,UAAU,KAAK,gBA0F5B"}
|
|
@@ -36,9 +36,8 @@ export default function Issue() {
|
|
|
36
36
|
const maxLengtMessage = t('Case description cannot be more than {{limit}} characters', {
|
|
37
37
|
limit: MODIFIED_DESCRIPTION_LENGTH_LIMIT,
|
|
38
38
|
});
|
|
39
|
-
const handleFormSubmit = (e) => e.preventDefault();
|
|
40
39
|
return (React.createElement(React.Fragment, null,
|
|
41
|
-
React.createElement("form", {
|
|
40
|
+
React.createElement("form", { className: "push-bottom" },
|
|
42
41
|
React.createElement(OpenCaseIssue, { inlineEditable: false, hideSaveCancel: true, initialIsEditing: isEmpty(summary), required: true }),
|
|
43
42
|
React.createElement(MoreOrLess, { maxHeight: 600, appStickyHeaderRef: navBarRef },
|
|
44
43
|
React.createElement(InlineEdit, { labelProps: { htmlFor: 'issue-section-ktQ1-issue' }, labelContent: React.createElement(React.Fragment, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenCase.d.ts","sourceRoot":"","sources":["../../../../src/components/OpenCase/OpenCase.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"OpenCase.d.ts","sourceRoot":"","sources":["../../../../src/components/OpenCase/OpenCase.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAKlE,MAAM,WAAW,MAAM;IACnB,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,MAAM,eAiB7C"}
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
2
|
-
import React
|
|
3
|
-
import { AppMetadataStateContext } from '../../context/AppMetadataContext';
|
|
2
|
+
import React from 'react';
|
|
4
3
|
import { AccountSelector } from '../AccountInfo/AccountSelector';
|
|
5
4
|
import { OwnerSelector } from '../AccountInfo/OwnerSelector';
|
|
6
5
|
import SupportTypeSelectorPage from './SupportTypeSelectorPage';
|
|
7
6
|
export default function OpenCase(props) {
|
|
8
|
-
const { appMetadataState: { nextButtonRef }, } = useContext(AppMetadataStateContext);
|
|
9
|
-
const handleFormSubmit = (e) => {
|
|
10
|
-
e.preventDefault();
|
|
11
|
-
// simulating click
|
|
12
|
-
nextButtonRef.current.click();
|
|
13
|
-
};
|
|
14
7
|
const canChangeAccountInfo = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.ACCOUNT_AND_OWNER);
|
|
15
|
-
return (React.createElement("form",
|
|
8
|
+
return (React.createElement("form", null,
|
|
16
9
|
canChangeAccountInfo && (React.createElement(React.Fragment, null,
|
|
17
10
|
React.createElement(AccountSelector, null),
|
|
18
11
|
React.createElement(OwnerSelector, null))),
|
|
@@ -14,7 +14,7 @@ export default function SupportTypeSelectorPage() {
|
|
|
14
14
|
const { globalMetadataState: { allCaseTypes, loggedInUsersAccount }, } = useGlobalStateContext();
|
|
15
15
|
const globalDispatch = useGlobalDispatchContext();
|
|
16
16
|
const [selectedSupportType, setSelectedSupportType] = useState('');
|
|
17
|
-
const { routeState: {
|
|
17
|
+
const { routeState: { isNextBtnClickedToShowValidationError }, } = useContext(RouteContext);
|
|
18
18
|
const { caseType, isFetchingSelectedAccountDetails, selectedAccountDetails } = useCaseSelector((state) => ({
|
|
19
19
|
caseType: state.caseDetails.caseType,
|
|
20
20
|
isFetchingSelectedAccountDetails: state.selectedAccountDetails.isFetching,
|
|
@@ -117,7 +117,7 @@ export default function SupportTypeSelectorPage() {
|
|
|
117
117
|
React.createElement(Gallery, { hasGutter: true, className: "pf-u-mt-sm" }, SupportTypesArray.map((supportTypesArrayValues) => {
|
|
118
118
|
var _a;
|
|
119
119
|
return (React.createElement(GalleryItem, { key: supportTypesArrayValues.id },
|
|
120
|
-
React.createElement(Card, { id: supportTypesArrayValues.oldSupportType, key: supportTypesArrayValues.oldSupportType, className: `support-types-card${
|
|
120
|
+
React.createElement(Card, { id: supportTypesArrayValues.oldSupportType, key: supportTypesArrayValues.oldSupportType, className: `support-types-card${isNextBtnClickedToShowValidationError && !caseType ? ' support-types-invalid' : ''}`, onKeyDown: onKeyDown, onClick: onSupportTypeClick, onSelectableInputChange: onChange, isSelected: !!caseType && supportTypesArrayValues.oldSupportType === caseType, hasSelectableInput: true, isSelectable: true, isSelectableRaised: true, isFullHeight: true, isDisabledRaised: ((_a = selectedAccountDetails === null || selectedAccountDetails === void 0 ? void 0 : selectedAccountDetails.data) === null || _a === void 0 ? void 0 : _a.subscriptionAbuse) || false, selectableInputAriaLabel: t(supportTypesArrayValues.supportTypeHeading) },
|
|
121
121
|
React.createElement(CardBody, null, supportTypesArrayValues.icon ? (React.createElement(Split, null,
|
|
122
122
|
React.createElement(SplitItem, { className: "pf-u-pr-lg" },
|
|
123
123
|
React.createElement(Bullseye, null, supportTypesArrayValues.icon && supportTypesArrayValues.icon)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AllProductsSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/AllProductsSelector.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAKnD,OAAO,EAAqB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMrF,UAAU,MAAM;IACZ,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAgBD;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"AllProductsSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/AllProductsSelector.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAKnD,OAAO,EAAqB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMrF,UAAU,MAAM;IACZ,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAgBD;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,4EAuKvB,CAAC;AAGH,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -126,7 +126,7 @@ const AllProductsSelector = forwardRef((props, ref) => {
|
|
|
126
126
|
React.createElement(OpenCaseIssue, { inlineEditable: false, required: true })),
|
|
127
127
|
React.createElement("div", { className: "all-product-selector-dropdown" },
|
|
128
128
|
React.createElement(ProductVersionDropdownSelector, { isLoading: allProducts.isFetching, products: props.checkEntitledProduct ? entitledProducts : allProducts.data.productsResult, selectedProduct: selectedProductForDropdown, onProductChange: onProductChange, onVersionChange: onVersionChange, version: version, ref: ref }))),
|
|
129
|
-
React.createElement(AlertMessage, { variant: AlertType.DANGER, className: "push-top", title: t(`${loggedInUserRights.data.isSSOUsernameSameAsLoggedInUser(contactSSOName)
|
|
129
|
+
React.createElement(AlertMessage, { isInline: true, variant: AlertType.DANGER, className: "push-top", title: t(`${loggedInUserRights.data.isSSOUsernameSameAsLoggedInUser(contactSSOName)
|
|
130
130
|
? 'You are'
|
|
131
131
|
: 'Selected owner is'} not allowed to create case on this product.`), show: !allProducts.isFetching && props.checkEntitledProduct && !isEntitledProduct && !isEmpty(product) }),
|
|
132
132
|
React.createElement(LoadingIndicator, { show: topContent.isFetching && props.loadTCOnChange }),
|
|
@@ -4,7 +4,7 @@ interface IProps {
|
|
|
4
4
|
onProductChange: (product: Partial<ISEProduct>) => any;
|
|
5
5
|
selectedProduct: Partial<ISEProduct>;
|
|
6
6
|
onVersionChange: (version: string) => any;
|
|
7
|
-
|
|
7
|
+
isNextBtnClickedToShowValidationError: boolean;
|
|
8
8
|
isCaseCreate: boolean;
|
|
9
9
|
}
|
|
10
10
|
export declare const NewProductDropdownSelector: (props: IProps) => JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewProductDropdownSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/NewProductDropdownSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAOpE,UAAU,MAAM;IACZ,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAChC,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC;IACvD,eAAe,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACrC,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC;IAC1C,
|
|
1
|
+
{"version":3,"file":"NewProductDropdownSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/NewProductDropdownSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAOpE,UAAU,MAAM;IACZ,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAChC,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC;IACvD,eAAe,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACrC,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC;IAC1C,qCAAqC,EAAE,OAAO,CAAC;IAC/C,YAAY,EAAE,OAAO,CAAC;CACzB;AAED,eAAO,MAAM,0BAA0B,UAAW,MAAM,gBA0GvD,CAAC"}
|
|
@@ -7,7 +7,7 @@ export const NewProductDropdownSelector = (props) => {
|
|
|
7
7
|
const { t } = useTranslation();
|
|
8
8
|
const [isOpen, setIsOpen] = useState(false);
|
|
9
9
|
const [selected, setSelected] = useState(undefined);
|
|
10
|
-
const [showValidationLocal, setShowValidationLocal] = useState(props.
|
|
10
|
+
const [showValidationLocal, setShowValidationLocal] = useState(props.isNextBtnClickedToShowValidationError);
|
|
11
11
|
const { globalMetadataState: { allProducts }, } = useContext(GlobalMetadataStateContext);
|
|
12
12
|
useEffect(() => {
|
|
13
13
|
if (props.selectedProduct) {
|
|
@@ -16,9 +16,9 @@ export const NewProductDropdownSelector = (props) => {
|
|
|
16
16
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
17
17
|
}, [props.selectedProduct]);
|
|
18
18
|
useEffect(() => {
|
|
19
|
-
setShowValidationLocal(props.
|
|
19
|
+
setShowValidationLocal(props.isNextBtnClickedToShowValidationError);
|
|
20
20
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
21
|
-
}, [props.
|
|
21
|
+
}, [props.isNextBtnClickedToShowValidationError]);
|
|
22
22
|
const createOption = (product, id, type) => {
|
|
23
23
|
return React.createElement(SelectOption, { key: `${type}-${id}`, value: product.name, className: "pf-c-select__menu-wrapper" });
|
|
24
24
|
};
|
|
@@ -3,7 +3,7 @@ interface IProps {
|
|
|
3
3
|
selectedProduct: Partial<ISEProduct>;
|
|
4
4
|
onVersionChange: (option: string) => void;
|
|
5
5
|
versionState: string;
|
|
6
|
-
|
|
6
|
+
isNextBtnClickedToShowValidationError: boolean;
|
|
7
7
|
}
|
|
8
8
|
export declare const NewProductVersionSelector: (props: IProps) => JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewProductVersionSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/NewProductVersionSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAMpE,UAAU,MAAM;IACZ,eAAe,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACrC,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,
|
|
1
|
+
{"version":3,"file":"NewProductVersionSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/NewProductVersionSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAMpE,UAAU,MAAM;IACZ,eAAe,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACrC,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,qCAAqC,EAAE,OAAO,CAAC;CAClD;AAED,eAAO,MAAM,yBAAyB,UAAW,MAAM,gBA+EtD,CAAC"}
|
|
@@ -7,11 +7,11 @@ export const NewProductVersionSelector = (props) => {
|
|
|
7
7
|
const [isOpen, setIsOpen] = useState(false);
|
|
8
8
|
const [selected, setSelected] = useState('');
|
|
9
9
|
const [selectVersionOptions, setSelectVersionOptions] = React.useState([]);
|
|
10
|
-
const [showValidationLocal, setShowValidationLocal] = useState(props.
|
|
10
|
+
const [showValidationLocal, setShowValidationLocal] = useState(props.isNextBtnClickedToShowValidationError);
|
|
11
11
|
useEffect(() => {
|
|
12
|
-
setShowValidationLocal(props.
|
|
12
|
+
setShowValidationLocal(props.isNextBtnClickedToShowValidationError);
|
|
13
13
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
14
|
-
}, [props.
|
|
14
|
+
}, [props.isNextBtnClickedToShowValidationError]);
|
|
15
15
|
useEffect(() => {
|
|
16
16
|
if (isEmpty(props.selectedProduct)) {
|
|
17
17
|
setSelected('');
|
|
@@ -26,7 +26,6 @@ export default function ProductSelector(props) {
|
|
|
26
26
|
product: state.caseDetails.product,
|
|
27
27
|
version: state.caseDetails.version,
|
|
28
28
|
}), isEqual);
|
|
29
|
-
const handleFormSubmit = (e) => e.preventDefault();
|
|
30
29
|
const { routeState: { isCaseCreate }, } = useContext(RouteContext);
|
|
31
30
|
/**
|
|
32
31
|
* The all product selector and top product selector should always be "selected" because
|
|
@@ -38,7 +37,7 @@ export default function ProductSelector(props) {
|
|
|
38
37
|
allProducts.isFetching && React.createElement(ProductSelectorLoader, null),
|
|
39
38
|
React.createElement(AlertMessage, { variant: AlertType.DANGER, className: "push-top", title: t('There was an error loading products.'), show: allProducts.isError }),
|
|
40
39
|
!allProducts.isFetching && !allProducts.isError && (React.createElement(React.Fragment, null,
|
|
41
|
-
React.createElement("form",
|
|
40
|
+
React.createElement("form", null,
|
|
42
41
|
React.createElement(AllProductsSelector, { isDropdownSelected: true, routeProps: props.routeProps, checkEntitledProduct: isCaseCreate ? true : false, ref: productSelectorRef }),
|
|
43
42
|
product === 'Subscription Watch' && (React.createElement(Alert, { isInline: true, variant: AlertVariant.warning, title: React.createElement(Trans, null,
|
|
44
43
|
' ',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductSelectorLoader.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/ProductSelectorLoader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProductSelectorLoader.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/ProductSelectorLoader.tsx"],"names":[],"mappings":"AAGA,wBAAgB,qBAAqB,gBAkBpC"}
|
|
@@ -1,21 +1,14 @@
|
|
|
1
|
+
import { Skeleton } from '@patternfly/react-core';
|
|
1
2
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
React.createElement(
|
|
6
|
-
React.createElement(
|
|
7
|
-
React.createElement(
|
|
8
|
-
React.createElement(
|
|
9
|
-
React.createElement(
|
|
10
|
-
React.createElement(
|
|
11
|
-
React.createElement(
|
|
12
|
-
React.createElement(
|
|
13
|
-
React.createElement("rect", { x: "25", y: "230", width: "270", height: "15" }),
|
|
14
|
-
React.createElement("circle", { cx: "10", cy: "280", r: "8" }),
|
|
15
|
-
React.createElement("rect", { x: "25", y: "280", width: "200", height: "15" }),
|
|
16
|
-
React.createElement("circle", { cx: "10", cy: "330", r: "8" }),
|
|
17
|
-
React.createElement("rect", { x: "25", y: "330", width: "170", height: "15" }),
|
|
18
|
-
React.createElement("circle", { cx: "10", cy: "380", r: "8" }),
|
|
19
|
-
React.createElement("rect", { x: "25", y: "380", width: "220", height: "15" }),
|
|
20
|
-
React.createElement("rect", { x: "0", y: "450", width: "400", height: "15" })));
|
|
3
|
+
export function ProductSelectorLoader() {
|
|
4
|
+
return (React.createElement("div", { style: { width: '100%', position: 'relative', height: '720px' } },
|
|
5
|
+
React.createElement(Skeleton, { height: "15px", width: "100px", style: { top: '0px' } }),
|
|
6
|
+
React.createElement(Skeleton, { height: "30px", width: "100%", style: { top: '30px' } }),
|
|
7
|
+
React.createElement(Skeleton, { height: "15px", width: "80px", style: { top: '90px' } }),
|
|
8
|
+
React.createElement(Skeleton, { height: "30px", width: "63%", style: { top: '120px' } }),
|
|
9
|
+
React.createElement(Skeleton, { height: "15px", width: "100px", style: { top: '90px', left: '68%' } }),
|
|
10
|
+
React.createElement(Skeleton, { height: "30px", width: "32%", style: { top: '120px', left: '68%' } }),
|
|
11
|
+
React.createElement(Skeleton, { height: "145px", width: "100%", style: { top: '200px' } }),
|
|
12
|
+
React.createElement(Skeleton, { height: "145px", width: "100%", style: { top: '375px' } }),
|
|
13
|
+
React.createElement(Skeleton, { height: "145px", width: "100%", style: { top: '550px' } })));
|
|
21
14
|
}
|
|
@@ -8,7 +8,7 @@ const defaultProps = {
|
|
|
8
8
|
htmlForId: '',
|
|
9
9
|
};
|
|
10
10
|
const ProductVersionDropdownSelector = forwardRef((props, ref) => {
|
|
11
|
-
const { routeState: { isCaseCreate,
|
|
11
|
+
const { routeState: { isCaseCreate, isNextBtnClickedToShowValidationError }, } = useContext(RouteContext);
|
|
12
12
|
return (React.createElement(React.Fragment, null,
|
|
13
13
|
React.createElement("div", { className: "product-selector-wrapper" },
|
|
14
14
|
React.createElement("label", { htmlFor: "product-selector-dropdown-downshift-search", ref: ref },
|
|
@@ -16,14 +16,14 @@ const ProductVersionDropdownSelector = forwardRef((props, ref) => {
|
|
|
16
16
|
React.createElement(Trans, null, "Product"),
|
|
17
17
|
' ',
|
|
18
18
|
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))),
|
|
19
|
-
React.createElement(NewProductDropdownSelector, { products: props.products, onProductChange: props.onProductChange, selectedProduct: props.selectedProduct, onVersionChange: props.onVersionChange,
|
|
19
|
+
React.createElement(NewProductDropdownSelector, { products: props.products, onProductChange: props.onProductChange, selectedProduct: props.selectedProduct, onVersionChange: props.onVersionChange, isNextBtnClickedToShowValidationError: isNextBtnClickedToShowValidationError, isCaseCreate: isCaseCreate })),
|
|
20
20
|
React.createElement("div", { className: "version-selector-wrapper" },
|
|
21
21
|
React.createElement("label", { htmlFor: "version-selector-dropdown-toggle" },
|
|
22
22
|
React.createElement("h3", { className: "subheading subheading-sm" },
|
|
23
23
|
React.createElement(Trans, null, "Version"),
|
|
24
24
|
' ',
|
|
25
25
|
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))),
|
|
26
|
-
React.createElement(NewProductVersionSelector, { selectedProduct: props.selectedProduct, onVersionChange: props.onVersionChange, versionState: props.version,
|
|
26
|
+
React.createElement(NewProductVersionSelector, { selectedProduct: props.selectedProduct, onVersionChange: props.onVersionChange, versionState: props.version, isNextBtnClickedToShowValidationError: isNextBtnClickedToShowValidationError }))));
|
|
27
27
|
});
|
|
28
28
|
ProductVersionDropdownSelector.defaultProps = defaultProps;
|
|
29
29
|
export { ProductVersionDropdownSelector };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClusterRecommendationToast.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/ClusterRecommendationToast.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ClusterRecommendationToast.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/ClusterRecommendationToast.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,EAAE,EAAmC,MAAM,OAAO,CAAC;AAUnE,UAAU,MAAM;CAAG;AAEnB,QAAA,MAAM,0BAA0B,EAAE,EAAE,CAAC,MAAM,CAsD1C,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Alert, AlertActionCloseButton, Button } from '@patternfly/react-core';
|
|
2
2
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
3
|
-
import
|
|
3
|
+
import isEmpty from 'lodash/isEmpty';
|
|
4
|
+
import isEqual from 'lodash/isEqual';
|
|
4
5
|
import React, { useContext, useEffect, useState } from 'react';
|
|
5
6
|
import { Trans } from 'react-i18next';
|
|
6
7
|
import { useCaseSelector } from '../../context/CaseContext';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Button } from '@patternfly/react-core';
|
|
2
2
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
3
|
-
import
|
|
3
|
+
import isEqual from 'lodash/isEqual';
|
|
4
4
|
import React, { useContext } from 'react';
|
|
5
5
|
import { Trans } from 'react-i18next';
|
|
6
6
|
import { useCaseSelector } from '../../context/CaseContext';
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { Button, Modal, ModalVariant } from '@patternfly/react-core';
|
|
11
|
-
import
|
|
11
|
+
import isEqual from 'lodash/isEqual';
|
|
12
12
|
import React, { useContext } from 'react';
|
|
13
13
|
import { Trans, useTranslation } from 'react-i18next';
|
|
14
14
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionRestore.d.ts","sourceRoot":"","sources":["../../../../src/components/SessionRestore/SessionRestore.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAQvD,OAAO,EAGH,eAAe,EAElB,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"SessionRestore.d.ts","sourceRoot":"","sources":["../../../../src/components/SessionRestore/SessionRestore.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAQvD,OAAO,EAGH,eAAe,EAElB,MAAM,iCAAiC,CAAC;AAgBzC,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,eAgU3C"}
|
|
@@ -10,20 +10,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { pcm } from '@cee-eng/hydrajs';
|
|
11
11
|
import { useDebounce, useDeepCompareDebounce, usePrevious } from '@rh-support/components';
|
|
12
12
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
13
|
-
import { getUserAgentForCaseMode
|
|
13
|
+
import { getUserAgentForCaseMode } from '@rh-support/utils';
|
|
14
14
|
import includes from 'lodash/includes';
|
|
15
15
|
import isEmpty from 'lodash/isEmpty';
|
|
16
16
|
import isEqual from 'lodash/isEqual';
|
|
17
17
|
import orderBy from 'lodash/orderBy';
|
|
18
18
|
import React, { useContext, useEffect, useState } from 'react';
|
|
19
19
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
20
|
-
import { RouteContext
|
|
20
|
+
import { RouteContext } from '../../context/RouteContext';
|
|
21
21
|
import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../context/SessionRestoreContext';
|
|
22
22
|
import { CaseReducerConstants, SESSION_REFERRER_URL_LIMIT } from '../../reducers/CaseConstNTypes';
|
|
23
23
|
import { getSessionDetailsFromCase } from '../../reducers/CaseHelpers';
|
|
24
24
|
import { setCaseAccountNumber, setCaseOwner, setCaseState, updateCaseWithSession } from '../../reducers/CaseReducer';
|
|
25
25
|
import { AppRouteSections, sessionRestoreCardSections, } from '../../reducers/RouteConstNTypes';
|
|
26
|
-
import { getAppRouteSectionsSequence, getDefaultSection, RouteReducerConstants } from '../../reducers/RouteReducer';
|
|
27
26
|
import { createSession, getRelevantSessionFromSessions, loadPreviousSessions, markAllSessionsUnresolved, updateActiveSessionId, updateSession, } from '../../reducers/SessionRestoreReducer';
|
|
28
27
|
import RouteUtils from '../../utils/routeUtils';
|
|
29
28
|
import { resetAttachment } from '../shared/fileUpload';
|
|
@@ -34,7 +33,6 @@ import { SessionRestoreCard } from './SessionRestoreCard';
|
|
|
34
33
|
export function SessionRestore(props) {
|
|
35
34
|
const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
|
|
36
35
|
const dispatchToAttachmentReducer = useContext(AttachmentDispatchContext);
|
|
37
|
-
const dispatchToRouteReducer = useRouteDispatchContext();
|
|
38
36
|
const { sessionRestore } = useContext(SessionRestoreStateContext);
|
|
39
37
|
const { selectedNotificationContacts, cepDetails, caseDetails, caseCreation500ErrorStatus } = useCaseSelector((state) => ({
|
|
40
38
|
openshiftClusterID: state.caseDetails.openshiftClusterID,
|
|
@@ -48,11 +46,10 @@ export function SessionRestore(props) {
|
|
|
48
46
|
const queryParamsFromUrl = RouteUtils.getQueryParams(props.routeProps);
|
|
49
47
|
const currentUrlSeSessionId = queryParamsFromUrl.seSessionId;
|
|
50
48
|
const previousUrlSeSessionId = usePrevious(currentUrlSeSessionId);
|
|
51
|
-
const { routeState: { activeSection, isCaseCreate, isSearchIntent
|
|
49
|
+
const { routeState: { activeSection, isCaseCreate, isSearchIntent }, } = useContext(RouteContext);
|
|
52
50
|
const [isRestoring, setIsRestoring] = useState(false);
|
|
53
51
|
const [previousSessions, setPreviousSessions] = useState([]);
|
|
54
52
|
const previousActiveSessionId = usePrevious(sessionRestore.activeSessionId);
|
|
55
|
-
const isIdea = caseDetails.caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
|
|
56
53
|
/**
|
|
57
54
|
* Fetching previous sessions on load
|
|
58
55
|
*/
|
|
@@ -186,7 +183,6 @@ export function SessionRestore(props) {
|
|
|
186
183
|
caseDispatch({ type: CaseReducerConstants.resetCaseState });
|
|
187
184
|
setCaseAccountNumber(caseDispatch, loggedInUserRights.data.getAccountNumber(), true, loggedInUsersAccount.data);
|
|
188
185
|
setCaseOwner(caseDispatch, loggedInUserRights.data.getHydraContactFromLoggedInUser(), sessionItem.sessionDetails.product);
|
|
189
|
-
dispatchToRouteReducer({ type: RouteReducerConstants.resetRouteState });
|
|
190
186
|
}
|
|
191
187
|
const sessionDetails = sessionRestore.previousSessions.data[sessionItem.session.id].sessionDetails;
|
|
192
188
|
// Automatically restoring a troubleshooting session in case creation can lead to overwriting open-case section details
|
|
@@ -208,8 +204,7 @@ export function SessionRestore(props) {
|
|
|
208
204
|
product: sessionItem.sessionDetails.product,
|
|
209
205
|
version: sessionItem.sessionDetails.version,
|
|
210
206
|
};
|
|
211
|
-
|
|
212
|
-
RouteUtils.navigateToSection(props.routeProps, getDefaultSection(isCaseCreate, isSearchIntent, isIdea), getAppRouteSectionsSequence(sectionsToHide, isCaseCreate, isSearchIntent, isIdea), isCaseCreate, isSearchIntent, isIdea, true, newParams);
|
|
207
|
+
RouteUtils.navigateToDefaltSection(props.routeProps, isCaseCreate, isSearchIntent, true, newParams);
|
|
213
208
|
}
|
|
214
209
|
else {
|
|
215
210
|
updateActiveSessionId(sessionRestoreDispatch, sessionItem.session.id);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Alert, AlertActionCloseButton, AlertActionLink, AlertVariant } from '@patternfly/react-core';
|
|
2
|
-
import
|
|
2
|
+
import isEqual from 'lodash/isEqual';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Trans, useTranslation } from 'react-i18next';
|
|
5
5
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
@@ -82,7 +82,7 @@ export default function SubmitCase() {
|
|
|
82
82
|
? false
|
|
83
83
|
: attachmentState.caseFiles.selectedLocalFiles.every((localFile) => !isUploadedAndAnalyzed(localFile));
|
|
84
84
|
const isNotAnIdea = caseType !== PreviousCaseTypes.FEATURE_ENHANCEMENT;
|
|
85
|
-
return (React.createElement(
|
|
85
|
+
return (React.createElement("article", { className: "gird-main" },
|
|
86
86
|
React.createElement(AlertMessage, { className: "push-top", title: t('Failed to add user.'), variant: AlertType.DANGER, show: addNotifiedUserError }),
|
|
87
87
|
React.createElement(AlertMessage, { className: "push-top", variant: AlertType.DANGER, show: caseCreationError, title: t("Sorry, we're experiencing an error"), isInline: true },
|
|
88
88
|
React.createElement(React.Fragment, null, caseCreationErrorMessage)),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@patternfly/pfe-accordion';
|
|
2
2
|
import { pcm } from '@cee-eng/hydrajs';
|
|
3
3
|
import { Tooltip } from '@patternfly/react-core';
|
|
4
|
-
import
|
|
4
|
+
import map from 'lodash/map';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import RouteUtils from '../../utils/routeUtils';
|
|
7
7
|
const { SessionResourceSource } = pcm.preCase.session;
|
|
@@ -37,8 +37,8 @@ function TroubleshootSection(props) {
|
|
|
37
37
|
const canAddAttachments = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.ATTACHMENTS);
|
|
38
38
|
const isNotAnIdea = caseType !== PreviousCaseTypes.FEATURE_ENHANCEMENT;
|
|
39
39
|
return (React.createElement(React.Fragment, null,
|
|
40
|
-
!isCreatingCase && (React.createElement("section",
|
|
41
|
-
React.createElement(OpenShiftClusterId,
|
|
40
|
+
!isCreatingCase && (React.createElement("section", null,
|
|
41
|
+
React.createElement(OpenShiftClusterId, { className: "push-bottom" }))),
|
|
42
42
|
React.createElement("section", null,
|
|
43
43
|
React.createElement("header", null,
|
|
44
44
|
React.createElement("h3", null,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AppRouteSections } from '../../reducers/RouteConstNTypes';
|
|
2
|
-
export declare function useIsSectionValid(sectionName
|
|
2
|
+
export declare function useIsSectionValid(sectionName: AppRouteSections): {
|
|
3
3
|
isSectionValid: boolean;
|
|
4
4
|
isSectionValidFn: (sectionNameLocal: any) => boolean;
|
|
5
5
|
isActiveSectionValid: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsSectionValid.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/useIsSectionValid.tsx"],"names":[],"mappings":"AAyBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"useIsSectionValid.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/useIsSectionValid.tsx"],"names":[],"mappings":"AAyBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,gBAAgB;;;;;EA4K9D"}
|