@rh-support/troubleshoot 0.2.116 → 0.2.117
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +6 -4
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +111 -52
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +8 -6
- package/lib/esm/components/Recommendations/AlertToastWrapper.d.ts +1 -0
- package/lib/esm/components/Recommendations/AlertToastWrapper.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AlertToastWrapper.js +4 -2
- package/lib/esm/components/SessionRestore/RestoreLastSessionModal.d.ts +9 -0
- package/lib/esm/components/SessionRestore/RestoreLastSessionModal.d.ts.map +1 -0
- package/lib/esm/components/SessionRestore/RestoreLastSessionModal.js +43 -0
- package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.js +11 -5
- package/lib/esm/components/SubmitCase/ResubmitToast.d.ts +7 -0
- package/lib/esm/components/SubmitCase/ResubmitToast.d.ts.map +1 -0
- package/lib/esm/components/SubmitCase/ResubmitToast.js +25 -0
- package/lib/esm/components/wizardLayout/WizardAside.d.ts +1 -0
- package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardAside.js +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +6 -5
- package/lib/esm/reducers/CaseConstNTypes.d.ts +3 -1
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +2 -0
- package/lib/esm/reducers/CaseReducer.d.ts +12 -0
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +35 -1
- package/lib/esm/reducers/SessionRestoreReducer.d.ts +5 -2
- package/lib/esm/reducers/SessionRestoreReducer.d.ts.map +1 -1
- package/lib/esm/reducers/SessionRestoreReducer.js +24 -1
- package/package.json +9 -9
package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActiveCustomerEscalation.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAMpD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,wBAAwB,+
|
|
1
|
+
{"version":3,"file":"ActiveCustomerEscalation.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAMpD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,wBAAwB,+EAkHnC,CAAC"}
|
package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Button } from '@patternfly/react-core';
|
|
1
|
+
import { Button, Popover } from '@patternfly/react-core';
|
|
2
2
|
import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
3
3
|
import { useCanEditCase } from '@rh-support/react-context';
|
|
4
4
|
import { Can, resourceActions, resources } from '@rh-support/user-permissions';
|
|
@@ -37,9 +37,11 @@ export const ActiveCustomerEscalation = forwardRef((props, ref) => {
|
|
|
37
37
|
};
|
|
38
38
|
const isNotInternalElements = (React.createElement("div", { className: "card card-white card-support escalations", ref: ref },
|
|
39
39
|
React.createElement("h3", { className: "card-heading" },
|
|
40
|
-
t('
|
|
41
|
-
React.createElement("
|
|
42
|
-
React.createElement(
|
|
40
|
+
t('Request an escalation'),
|
|
41
|
+
React.createElement("div", { style: { marginLeft: 'auto' } },
|
|
42
|
+
React.createElement(Popover, { showClose: false, position: 'left', hasAutoWidth: true, bodyContent: (hide) => (React.createElement("a", { href: "/support/escalation", target: "_blank" },
|
|
43
|
+
React.createElement(Trans, null, "Learn more about escalation cases."))) },
|
|
44
|
+
React.createElement(InfoCircleIcon, { title: t('Learn more about escalation cases popover') })))),
|
|
43
45
|
React.createElement("div", { className: "card-body" },
|
|
44
46
|
React.createElement("p", null,
|
|
45
47
|
React.createElement("strong", null, `${t('Request a management escalation if your issue')}`),
|
package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestEscalationModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestEscalationModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.tsx"],"names":[],"mappings":"AAwCA,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAID,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,eA4VnD"}
|
|
@@ -8,11 +8,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { escalations, publicApi } from '@cee-eng/hydrajs';
|
|
11
|
-
import { Button, Modal,
|
|
11
|
+
import { Button, Form, FormGroup, Grid, GridItem, Modal, Popover, Select, SelectOption, TextArea, TextInput, Title, ValidatedOptions, } from '@patternfly/react-core';
|
|
12
|
+
import ExclamationCircleIcon from '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
|
|
13
|
+
import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
12
14
|
import { AlertMessage, AlertType, LoadingIndicator, ToastNotification, useFetch } from '@rh-support/components';
|
|
13
15
|
import { useGlobalStateContext } from '@rh-support/react-context';
|
|
14
16
|
import isEmpty from 'lodash/isEmpty';
|
|
15
|
-
import React, { useState } from 'react';
|
|
17
|
+
import React, { useEffect, useState } from 'react';
|
|
16
18
|
import { Trans, useTranslation } from 'react-i18next';
|
|
17
19
|
import { useCaseDispatch } from '../../../context/CaseContext';
|
|
18
20
|
import { useCaseDetailsPageDispatchContext, useCaseDetailsPageStateContext, } from '../../../context/CaseDetailsPageContext';
|
|
@@ -26,23 +28,31 @@ const customerGEOKeys = Object.keys(CustomerGEOs);
|
|
|
26
28
|
export function RequestEscalationModal(props) {
|
|
27
29
|
const { globalMetadataState: { loggedInUser, loggedInUserRights }, } = useGlobalStateContext();
|
|
28
30
|
const { t } = useTranslation();
|
|
29
|
-
const [
|
|
30
|
-
const
|
|
31
|
-
const [
|
|
31
|
+
const [showGeoDropdown, setGeoShowDropdown] = useState(false);
|
|
32
|
+
const onGeoDropdownToggle = (toggle) => setGeoShowDropdown(toggle);
|
|
33
|
+
const [showCategoryDropdown, setCategoryShowDropdown] = useState(false);
|
|
34
|
+
const onCategoryDropdownToggle = (toggle) => setCategoryShowDropdown(toggle);
|
|
35
|
+
const [categories, setCategories] = useState([]);
|
|
36
|
+
const initialState = {
|
|
32
37
|
subject: '',
|
|
33
38
|
description: '',
|
|
34
39
|
expectations: '',
|
|
35
40
|
geo: '',
|
|
36
|
-
|
|
41
|
+
businessImpactDescription: '',
|
|
42
|
+
rmeCategory: '',
|
|
43
|
+
};
|
|
44
|
+
const [formState, setFormState] = useState(initialState);
|
|
37
45
|
const [hasLargeSubject, setHasLargeSubject] = useState(false);
|
|
46
|
+
const [submitButtonIsClicked, setSubmitSaveButtonIsClicked] = useState(false);
|
|
38
47
|
// checks if all the fields have values.
|
|
39
48
|
const hasRequiredInfo = () => Object.keys(formState).reduce((accumulator, currentValue) => { var _a; return !accumulator ? accumulator : formState[currentValue].length > 0 && ((_a = formState[currentValue]) === null || _a === void 0 ? void 0 : _a.trim()); }, true);
|
|
40
|
-
const
|
|
49
|
+
const setFormStateValue = (key) => (value) => setFormState(Object.assign(Object.assign({}, formState), { [key]: value }));
|
|
41
50
|
const createEscalationFetch = useFetch(escalations.createIceEscalation, { propgateErrors: true });
|
|
42
51
|
const { request: postCommentRequest, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
|
|
43
52
|
propgateErrors: true,
|
|
44
53
|
});
|
|
45
54
|
const { request: updateCaseRequest, isFetching: isUpdatingCase } = useFetch(publicApi.kase.updateCase);
|
|
55
|
+
const { request: getRmeCategories, isFetching: isCategoriesFetching } = useFetch(escalations.getEscalationCategories, { propgateErrors: true });
|
|
46
56
|
const { sort, allDiscussions, discussionFiltersListState } = useCaseDiscussionTabStateContext();
|
|
47
57
|
const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
|
|
48
58
|
const { caseDetailsPageState: { caseFeedbacksHydra }, } = useCaseDetailsPageStateContext();
|
|
@@ -52,7 +62,11 @@ export function RequestEscalationModal(props) {
|
|
|
52
62
|
const onErrorClose = () => setCreationError(false);
|
|
53
63
|
const setGeoState = (event, selection) => {
|
|
54
64
|
setFormState(Object.assign(Object.assign({}, formState), { geo: selection }));
|
|
55
|
-
|
|
65
|
+
onGeoDropdownToggle(false);
|
|
66
|
+
};
|
|
67
|
+
const setCategoryState = (event, selection) => {
|
|
68
|
+
setFormState(Object.assign(Object.assign({}, formState), { rmeCategory: selection }));
|
|
69
|
+
onCategoryDropdownToggle(false);
|
|
56
70
|
};
|
|
57
71
|
const submitEscalationComment = (escalationNum, comment) => __awaiter(this, void 0, void 0, function* () {
|
|
58
72
|
escalationNum &&
|
|
@@ -63,60 +77,105 @@ export function RequestEscalationModal(props) {
|
|
|
63
77
|
checkForCaseStatusToggleOnAttachOrComment(caseDispatch, loggedInUserRights.data.isInternal(), props.caseStatus);
|
|
64
78
|
escalationNum &&
|
|
65
79
|
ToastNotification.addSuccessMessage(t('Your escalation request has been successfully submitted.'));
|
|
66
|
-
props.onClose();
|
|
67
80
|
});
|
|
68
|
-
const onSubjectChange = (
|
|
69
|
-
var _a;
|
|
70
|
-
const subject = isEmpty((_a = e.target.value) === null || _a === void 0 ? void 0 : _a.trim()) ? '' : e.target.value;
|
|
81
|
+
const onSubjectChange = (subject) => {
|
|
71
82
|
const isSubjectLarge = subject.length > ESCALATION_SUBJECT_LENGTH_LIMIT;
|
|
72
83
|
setHasLargeSubject(isSubjectLarge);
|
|
73
|
-
|
|
84
|
+
setFormState(Object.assign(Object.assign({}, formState), { subject }));
|
|
85
|
+
};
|
|
86
|
+
const onCancel = () => {
|
|
87
|
+
if (isPostingComment || isUpdatingCase || createEscalationFetch.isFetching)
|
|
88
|
+
return;
|
|
89
|
+
setSubmitSaveButtonIsClicked(false);
|
|
90
|
+
setFormState(initialState);
|
|
91
|
+
setHasLargeSubject(false);
|
|
92
|
+
props.onClose();
|
|
74
93
|
};
|
|
75
|
-
const onCancel = () => props.onClose();
|
|
76
94
|
const onSubmit = () => __awaiter(this, void 0, void 0, function* () {
|
|
95
|
+
setSubmitSaveButtonIsClicked(true);
|
|
96
|
+
if (!hasRequiredInfo() || hasLargeSubject)
|
|
97
|
+
return;
|
|
77
98
|
try {
|
|
78
99
|
const res = yield createEscalationFetch.request(Object.assign(Object.assign({}, formState), { recordType: 'Active Customer Escalation', escalationSource: 'RME Escalation', status: 'New', accountNumber: loggedInUserRights.data.getAccountNumber(), caseNumber: props.caseNumber, requestor: `${loggedInUser.data.firstName} ${loggedInUser.data.lastName}`, requestorEmail: loggedInUser.data.email, requestorPhone: loggedInUser.data.phone, alreadyEscalated: false, severity: props.severity ? props.severity.charAt(0) : '3' }));
|
|
79
|
-
const fullComment = t('### Request Management Escalation:\n\n**Subject**\n{{subject}}\n\n**Description**\n{{description}}\n\n**Expectations**\n{{expectations}}', {
|
|
80
|
-
|
|
100
|
+
const fullComment = t('### Request Management Escalation:\n\n**Subject**\n{{subject}}\n\n**Category**\n{{rmeCategory}}\n\n**Description**\n{{description}}\n\n**Expectations**\n{{expectations}}\n\n**Business Impact**\n{{businessImpactDescription}}', {
|
|
101
|
+
category: formState.rmeCategory,
|
|
102
|
+
subject: formState.subject,
|
|
103
|
+
description: formState.description,
|
|
104
|
+
expectations: formState.expectations,
|
|
105
|
+
businessImpactDescription: formState.businessImpactDescription,
|
|
106
|
+
rmeCategory: formState.rmeCategory,
|
|
107
|
+
});
|
|
108
|
+
try {
|
|
109
|
+
yield submitEscalationComment(res.name, fullComment);
|
|
110
|
+
}
|
|
111
|
+
catch (e) {
|
|
112
|
+
// silently fails, escalation is created but adding comment fails
|
|
113
|
+
}
|
|
114
|
+
props.onClose();
|
|
81
115
|
}
|
|
82
116
|
catch (error) {
|
|
117
|
+
//=> handle error
|
|
83
118
|
setCreationError(true);
|
|
84
119
|
}
|
|
85
120
|
});
|
|
86
|
-
const modalActions =
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
React.createElement(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
React.createElement(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
React.createElement(
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
121
|
+
const modalActions = [
|
|
122
|
+
React.createElement(Button, { key: "submit", variant: "primary", onClick: onSubmit, "data-tracking-id": "request-rme-submit", isDisabled: submitButtonIsClicked &&
|
|
123
|
+
(isPostingComment || isUpdatingCase || createEscalationFetch.isFetching || !hasRequiredInfo()) },
|
|
124
|
+
(isPostingComment || isUpdatingCase || createEscalationFetch.isFetching) && (React.createElement(LoadingIndicator, { key: "loading", isInline: true })),
|
|
125
|
+
' ',
|
|
126
|
+
t('Submit')),
|
|
127
|
+
React.createElement(Button, { key: "cancel", variant: "link", onClick: onCancel, "data-tracking-id": "request-rme-cancel", isDisabled: createEscalationFetch.isFetching || isPostingComment || isUpdatingCase }, t('Cancel')),
|
|
128
|
+
];
|
|
129
|
+
const header = (React.createElement(Title, { id: "custom-header-label", headingLevel: "h1" },
|
|
130
|
+
React.createElement(Trans, null, "Request an escalation"),
|
|
131
|
+
React.createElement(Popover, { showClose: false, position: 'top', hasAutoWidth: true, bodyContent: () => (React.createElement("a", { href: "/support/escalation", target: "_blank" },
|
|
132
|
+
React.createElement(Trans, null, "Learn more about escalation cases."))) },
|
|
133
|
+
React.createElement(InfoCircleIcon, { className: "pf-u-ml-sm" }))));
|
|
134
|
+
useEffect(() => {
|
|
135
|
+
const fetchCategories = () => __awaiter(this, void 0, void 0, function* () {
|
|
136
|
+
try {
|
|
137
|
+
const cats = yield getRmeCategories();
|
|
138
|
+
setCategories(cats);
|
|
139
|
+
}
|
|
140
|
+
catch (e) {
|
|
141
|
+
console.log(e);
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
fetchCategories();
|
|
145
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
146
|
+
}, []);
|
|
147
|
+
return (React.createElement(Modal, { isOpen: props.show, onClose: onCancel, actions: modalActions, header: header },
|
|
148
|
+
React.createElement("p", { className: "pf-u-mb-md" },
|
|
149
|
+
React.createElement(Trans, { i18nKey: "i18RequestEscalationDescription" }, "Submit an escalation if an issue has become more severe or you feel the case needs a higher priority. A support manager will review yor escalation request.")),
|
|
150
|
+
React.createElement(AlertMessage, { variant: AlertType.DANGER, title: t('Could not create case escalation'), show: creationError, onClose: onErrorClose, isInline: true, className: "pf-u-mb-md" }),
|
|
151
|
+
React.createElement(Form, { "aria-label": t('form') },
|
|
152
|
+
React.createElement(Grid, { hasGutter: true, md: 12 },
|
|
153
|
+
React.createElement(GridItem, { span: 6 },
|
|
154
|
+
React.createElement(FormGroup, { isRequired: true, label: t('Category'), fieldId: "escalation-category" },
|
|
155
|
+
React.createElement(Select, Object.assign({ "aria-label": t('Category'), id: "customer-category-select", selections: formState.rmeCategory, validated: submitButtonIsClicked && isEmpty(formState.rmeCategory)
|
|
156
|
+
? ValidatedOptions.error
|
|
157
|
+
: ValidatedOptions.default, "aria-invalid": submitButtonIsClicked && isEmpty(formState.rmeCategory), onSelect: setCategoryState, isOpen: showCategoryDropdown, placeholderText: t('Select an option that best fits'), onToggle: onCategoryDropdownToggle }, (isCategoriesFetching && { loadingVariant: 'spinner' })), categories.map((value, index) => (React.createElement(SelectOption, { key: index, value: value }, value)))))),
|
|
158
|
+
React.createElement(GridItem, { span: 6 },
|
|
159
|
+
React.createElement(FormGroup, { isRequired: true, label: t('My region'), fieldId: "escalation-region" },
|
|
160
|
+
React.createElement(Select, { "aria-label": t('My region'), id: "customer-geo-select", selections: formState.geo, onSelect: setGeoState, isOpen: showGeoDropdown, validated: submitButtonIsClicked && isEmpty(formState.geo)
|
|
161
|
+
? ValidatedOptions.error
|
|
162
|
+
: ValidatedOptions.default, placeholderText: t('Select a location'), onToggle: onGeoDropdownToggle, "aria-invalid": submitButtonIsClicked && isEmpty(formState.geo) }, customerGEOKeys.map((key, index) => (React.createElement(SelectOption, { key: index, value: CustomerGEOs[key].value }, t(CustomerGEOs[key].label))))))),
|
|
163
|
+
React.createElement(FormGroup, { isRequired: true, validated: submitButtonIsClicked && hasLargeSubject ? ValidatedOptions.error : ValidatedOptions.default, helperTextInvalid: t('Subject cannot be more than {{limit}} characters', {
|
|
164
|
+
limit: ESCALATION_SUBJECT_LENGTH_LIMIT,
|
|
165
|
+
}), helperTextInvalidIcon: React.createElement(ExclamationCircleIcon, null), label: t('Subject'), fieldId: "escalation-subject" },
|
|
166
|
+
React.createElement(TextInput, { isRequired: true, validated: (submitButtonIsClicked && isEmpty(formState.subject)) || hasLargeSubject
|
|
167
|
+
? ValidatedOptions.error
|
|
168
|
+
: ValidatedOptions.default, type: "text", placeholder: t('Enter a subject for your request'), id: "subject-input", name: "subject-input", value: formState.subject, onChange: onSubjectChange, "aria-label": t('Subject') })),
|
|
169
|
+
React.createElement(FormGroup, { isRequired: true, label: t('Description'), fieldId: "escalation-description" },
|
|
170
|
+
React.createElement(TextArea, { value: formState.description, onChange: setFormStateValue('description'), isRequired: true, validated: submitButtonIsClicked && isEmpty(formState.description)
|
|
171
|
+
? ValidatedOptions.error
|
|
172
|
+
: ValidatedOptions.default, "aria-label": t('Description'), id: "description-textarea", placeholder: t('Provide a detailed comment for us to best assist you') })),
|
|
173
|
+
React.createElement(FormGroup, { isRequired: true, label: t('Expectations'), fieldId: "escalation-expectations" },
|
|
174
|
+
React.createElement(TextArea, { onChange: setFormStateValue('expectations'), isRequired: true, validated: submitButtonIsClicked && isEmpty(formState.expectations)
|
|
175
|
+
? ValidatedOptions.error
|
|
176
|
+
: ValidatedOptions.default, placeholder: t('What do you expect to happen with this escalation?'), id: "expectations-input", value: formState.expectations, "aria-label": t('Expectations') })),
|
|
177
|
+
React.createElement(FormGroup, { isRequired: true, label: t('Business impact'), fieldId: "escalation-business-impact" },
|
|
178
|
+
React.createElement(TextArea, { onChange: setFormStateValue('businessImpactDescription'), isRequired: true, validated: submitButtonIsClicked && isEmpty(formState.businessImpactDescription)
|
|
179
|
+
? ValidatedOptions.error
|
|
180
|
+
: ValidatedOptions.default, placeholder: t('Does your business impact change with this escalation? Please describe how it changed.'), id: "business-impact-input", value: formState.businessImpactDescription, "aria-label": t('Business impact') }))))));
|
|
122
181
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RMEEscalationList.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAqB,MAAM,2CAA2C,CAAC;AAwB/F,UAAU,MAAM;IACZ,WAAW,EAAE,eAAe,EAAE,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACtB;AAOD,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"RMEEscalationList.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAqB,MAAM,2CAA2C,CAAC;AAwB/F,UAAU,MAAM;IACZ,WAAW,EAAE,eAAe,EAAE,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACtB;AAOD,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,MAAM,eAyMtD"}
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { escalations, publicApi } from '@cee-eng/hydrajs';
|
|
11
|
-
import { Button, ButtonVariant } from '@patternfly/react-core';
|
|
11
|
+
import { Button, ButtonVariant, Flex, FlexItem } from '@patternfly/react-core';
|
|
12
12
|
import { LoadingIndicator, PFTable, Table, ToastNotification, useFetch } from '@rh-support/components';
|
|
13
13
|
import { ability, resourceActions, resources } from '@rh-support/user-permissions';
|
|
14
14
|
import { formatDate } from '@rh-support/utils';
|
|
@@ -119,11 +119,13 @@ export default function RMEEscalationList(props) {
|
|
|
119
119
|
React.createElement(Trans, null, "Request Re-Open")));
|
|
120
120
|
}
|
|
121
121
|
else {
|
|
122
|
-
return (React.createElement(
|
|
123
|
-
React.createElement(
|
|
124
|
-
React.createElement(
|
|
125
|
-
|
|
126
|
-
|
|
122
|
+
return (React.createElement(Flex, null,
|
|
123
|
+
React.createElement(FlexItem, null,
|
|
124
|
+
React.createElement(Button, { variant: ButtonVariant.secondary, onClick: () => requestUpdateRMEEscalation(escalation.name), "data-tracking-id": "case-details-rme-req-update", className: "" },
|
|
125
|
+
React.createElement(Trans, null, "Request Update"))),
|
|
126
|
+
React.createElement(FlexItem, null,
|
|
127
|
+
React.createElement(Button, { variant: ButtonVariant.secondary, className: "pf-u-mt-sm", onClick: () => requestClosureRMEEscalation(escalation.name), "data-tracking-id": "case-details-rme-req-closure" },
|
|
128
|
+
React.createElement(Trans, null, "Request Closure")))));
|
|
127
129
|
}
|
|
128
130
|
};
|
|
129
131
|
const canSeeClosedColumn = !isEmpty(find(escalationList, (e) => e.status === escalationStatus.closed));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertToastWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AlertToastWrapper.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AlertToastWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AlertToastWrapper.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMlC,UAAU,MAAM;IACZ,qBAAqB,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5D;AAED,QAAA,MAAM,iBAAiB,EAAE,EAAE,CAAC,MAAM,CASjC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { AlertGroup } from '@patternfly/react-core';
|
|
5
5
|
import React from 'react';
|
|
6
|
+
import { ResubmitToast } from '../SubmitCase/ResubmitToast';
|
|
6
7
|
import ClusterRecommendationToast from './ClusterRecommendationToast';
|
|
7
8
|
import CriticalSolutionsToast from './CriticalSolutionsToast';
|
|
8
|
-
const AlertToastWrapper = () => {
|
|
9
|
+
const AlertToastWrapper = ({ submitCaseAndNavigate }) => {
|
|
9
10
|
return (React.createElement(AlertGroup, { isToast: true },
|
|
10
11
|
React.createElement(CriticalSolutionsToast, null),
|
|
11
|
-
React.createElement(ClusterRecommendationToast, null)
|
|
12
|
+
React.createElement(ClusterRecommendationToast, null),
|
|
13
|
+
React.createElement(ResubmitToast, { submitCaseAndNavigate: submitCaseAndNavigate })));
|
|
12
14
|
};
|
|
13
15
|
export default AlertToastWrapper;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ISessionItem } from '@cee-eng/hydrajs/@types/api/pcm/troubleshootSession';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
interface IProps {
|
|
4
|
+
onRestore: (sessionItem: ISessionItem) => Promise<void>;
|
|
5
|
+
errorSession: ISessionItem;
|
|
6
|
+
}
|
|
7
|
+
export declare const RestoreLastSessionModal: FC<IProps>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=RestoreLastSessionModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RestoreLastSessionModal.d.ts","sourceRoot":"","sources":["../../../../src/components/SessionRestore/RestoreLastSessionModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AAGnF,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMlC,UAAU,MAAM;IACZ,SAAS,EAAE,CAAC,WAAW,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,YAAY,EAAE,YAAY,CAAC;CAC9B;AAED,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,MAAM,CA0D9C,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { Button, Modal, ModalVariant } from '@patternfly/react-core';
|
|
11
|
+
import { isEqual } from 'lodash';
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import { Trans, useTranslation } from 'react-i18next';
|
|
14
|
+
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
15
|
+
import { updateCaseCreationErrorStatus } from '../../reducers/CaseReducer';
|
|
16
|
+
export const RestoreLastSessionModal = ({ onRestore, errorSession }) => {
|
|
17
|
+
const { t } = useTranslation();
|
|
18
|
+
const { caseCreation500ErrorStatus, caseCreationError } = useCaseSelector((state) => ({
|
|
19
|
+
caseCreation500ErrorStatus: state.caseCreation500ErrorStatus,
|
|
20
|
+
caseCreationError: state.caseCreationError,
|
|
21
|
+
}), isEqual);
|
|
22
|
+
const caseDispatch = useCaseDispatch();
|
|
23
|
+
/**
|
|
24
|
+
* On Restore
|
|
25
|
+
*/
|
|
26
|
+
const onRestoreClick = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
27
|
+
yield onRestore(errorSession);
|
|
28
|
+
updateCaseCreationErrorStatus(caseDispatch, false);
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* On Open a new case close the modal by setting `caseCreationError` false
|
|
32
|
+
*/
|
|
33
|
+
const onOpenNewCase = () => {
|
|
34
|
+
updateCaseCreationErrorStatus(caseDispatch, false);
|
|
35
|
+
};
|
|
36
|
+
return (React.createElement(Modal, { "data-tracking-id": "restore-session-modal", variant: ModalVariant.small, title: t('Restore last session?'), isOpen: !caseCreationError && caseCreation500ErrorStatus, onClose: onOpenNewCase, actions: [
|
|
37
|
+
React.createElement(Button, { key: "restore", variant: "primary", onClick: onRestoreClick, "data-tracking-id": "restore-session-button" },
|
|
38
|
+
React.createElement(Trans, null, " Restore")),
|
|
39
|
+
React.createElement(Button, { key: "openANewCase", variant: "secondary", onClick: onOpenNewCase, "data-tracking-id": "restore-session-open-case-button" },
|
|
40
|
+
React.createElement(Trans, null, "Open a new case")),
|
|
41
|
+
] },
|
|
42
|
+
React.createElement(Trans, null, "It looks like an error prevented your last case from being submitted. Would you like to restore the last session or open a new case?")));
|
|
43
|
+
};
|
|
@@ -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;AAiBzC,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,eA4U3C"}
|
|
@@ -29,17 +29,19 @@ import RouteUtils from '../../utils/routeUtils';
|
|
|
29
29
|
import { resetAttachment } from '../shared/fileUpload';
|
|
30
30
|
import { restoreFilesFromSession } from '../shared/fileUpload/reducer/AttachmentHelper';
|
|
31
31
|
import { AttachmentDispatchContext } from '../shared/fileUpload/reducer/AttachmentReducerContext';
|
|
32
|
+
import { RestoreLastSessionModal } from './RestoreLastSessionModal';
|
|
32
33
|
import { SessionRestoreCard } from './SessionRestoreCard';
|
|
33
34
|
export function SessionRestore(props) {
|
|
34
35
|
const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
|
|
35
36
|
const dispatchToAttachmentReducer = useContext(AttachmentDispatchContext);
|
|
36
37
|
const dispatchToRouteReducer = useRouteDispatchContext();
|
|
37
38
|
const { sessionRestore } = useContext(SessionRestoreStateContext);
|
|
38
|
-
const { selectedNotificationContacts, cepDetails, caseDetails } = useCaseSelector((state) => ({
|
|
39
|
+
const { selectedNotificationContacts, cepDetails, caseDetails, caseCreation500ErrorStatus } = useCaseSelector((state) => ({
|
|
39
40
|
openshiftClusterID: state.caseDetails.openshiftClusterID,
|
|
40
41
|
cepDetails: state.cepDetails,
|
|
41
42
|
selectedNotificationContacts: state.selectedNotificationContacts,
|
|
42
43
|
caseDetails: state.caseDetails,
|
|
44
|
+
caseCreation500ErrorStatus: state.caseCreation500ErrorStatus,
|
|
43
45
|
}), isEqual);
|
|
44
46
|
const caseDispatch = useCaseDispatch();
|
|
45
47
|
const { globalMetadataState: { loggedInUsersAccount, loggedInUserRights, referrerUrl }, } = useContext(GlobalMetadataStateContext);
|
|
@@ -54,8 +56,8 @@ export function SessionRestore(props) {
|
|
|
54
56
|
* Fetching previous sessions on load
|
|
55
57
|
*/
|
|
56
58
|
useEffect(() => {
|
|
57
|
-
loadPreviousSessions(sessionRestoreDispatch);
|
|
58
|
-
}, [sessionRestoreDispatch]);
|
|
59
|
+
loadPreviousSessions(sessionRestoreDispatch, caseDispatch);
|
|
60
|
+
}, [sessionRestoreDispatch, caseDispatch]);
|
|
59
61
|
/**
|
|
60
62
|
* Creating/use existing session new session if one doesn't exist when:
|
|
61
63
|
* 1. hasFetchedPreviousSessions
|
|
@@ -129,7 +131,7 @@ export function SessionRestore(props) {
|
|
|
129
131
|
: !isEmpty(existingUserAgent) && existingUserAgent !== userAgent
|
|
130
132
|
? existingUserAgent
|
|
131
133
|
: userAgent;
|
|
132
|
-
let session = { userAgent, originatingSystem };
|
|
134
|
+
let session = { userAgent, originatingSystem, caseCreationError: caseCreation500ErrorStatus };
|
|
133
135
|
if (!isEmpty(caseDetails.caseNumber)) {
|
|
134
136
|
session = Object.assign(Object.assign({}, session), { isActive: false, isResolved: true, caseNumber: caseDetails.caseNumber });
|
|
135
137
|
}
|
|
@@ -141,6 +143,7 @@ export function SessionRestore(props) {
|
|
|
141
143
|
sessionRestore.activeSessionId,
|
|
142
144
|
sessionRestore.hasFetchedPreviousSessions,
|
|
143
145
|
sessionRestoreDispatch,
|
|
146
|
+
caseCreation500ErrorStatus,
|
|
144
147
|
], 500);
|
|
145
148
|
/**
|
|
146
149
|
* Patch CEP Details
|
|
@@ -279,5 +282,8 @@ export function SessionRestore(props) {
|
|
|
279
282
|
], 1000);
|
|
280
283
|
if (!sessionRestoreCardSections.includes(activeSection))
|
|
281
284
|
return React.createElement(React.Fragment, null);
|
|
282
|
-
return (React.createElement(
|
|
285
|
+
return (React.createElement(React.Fragment, null,
|
|
286
|
+
' ',
|
|
287
|
+
React.createElement(SessionRestoreCard, { onRestore: restoreSession, previousSessions: previousSessions, onCardDismiss: onSessionRestoreCardDismiss }),
|
|
288
|
+
React.createElement(RestoreLastSessionModal, { onRestore: restoreSession, errorSession: sessionRestore.sessionOfCaseCreationError })));
|
|
283
289
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResubmitToast.d.ts","sourceRoot":"","sources":["../../../../src/components/SubmitCase/ResubmitToast.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMlC,UAAU,MAAM;IACZ,qBAAqB,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5D;AAED,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,MAAM,CAuCpC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Alert, AlertActionCloseButton, AlertActionLink, AlertVariant } from '@patternfly/react-core';
|
|
2
|
+
import { isEqual } from 'lodash';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Trans, useTranslation } from 'react-i18next';
|
|
5
|
+
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
6
|
+
import { updateCaseCreationErrorStatus } from '../../reducers/CaseReducer';
|
|
7
|
+
export const ResubmitToast = ({ submitCaseAndNavigate }) => {
|
|
8
|
+
const { t } = useTranslation();
|
|
9
|
+
const { caseCreation500ErrorStatus, caseCreationError } = useCaseSelector((state) => ({
|
|
10
|
+
caseCreation500ErrorStatus: state.caseCreation500ErrorStatus,
|
|
11
|
+
caseCreationError: state.caseCreationError,
|
|
12
|
+
}), isEqual);
|
|
13
|
+
const caseDispatch = useCaseDispatch();
|
|
14
|
+
const onResubmit = () => {
|
|
15
|
+
updateCaseCreationErrorStatus(caseDispatch, false); // Hide the resubmit toast
|
|
16
|
+
submitCaseAndNavigate(true);
|
|
17
|
+
};
|
|
18
|
+
const onReturnToCase = () => {
|
|
19
|
+
updateCaseCreationErrorStatus(caseDispatch, false);
|
|
20
|
+
};
|
|
21
|
+
return caseCreationError && caseCreation500ErrorStatus ? (React.createElement(Alert, { "data-tracking-id": "resubmit-case-toast", variant: AlertVariant.danger, title: t('Case was not submitted due to an internal error'), actionClose: React.createElement(AlertActionCloseButton, { onClose: onReturnToCase }), actionLinks: React.createElement(React.Fragment, null,
|
|
22
|
+
React.createElement(AlertActionLink, { onClick: onResubmit }, t('Resubmit')),
|
|
23
|
+
React.createElement(AlertActionLink, { onClick: onReturnToCase }, t('Return to cases'))) },
|
|
24
|
+
React.createElement(Trans, null, "Don\u2019t panic\u2014we\u2019ve saved this case for you! You can try to submit again or restore your session at a later time."))) : null;
|
|
25
|
+
};
|
|
@@ -3,6 +3,7 @@ import { IRouteUrlParams } from '../../reducers/RouteConstNTypes';
|
|
|
3
3
|
interface IProps {
|
|
4
4
|
routeProps: RouteComponentProps<IRouteUrlParams>;
|
|
5
5
|
isAttachmentUploadModalOpen: boolean;
|
|
6
|
+
submitCaseAndNavigate: (isReSubmitting: boolean) => void;
|
|
6
7
|
}
|
|
7
8
|
declare function WizardAside(props: IProps): JSX.Element;
|
|
8
9
|
declare namespace WizardAside {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardAside.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardAside.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAKnD,OAAO,EAEH,eAAe,EAGlB,MAAM,iCAAiC,CAAC;AASzC,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,2BAA2B,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"WizardAside.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardAside.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAKnD,OAAO,EAEH,eAAe,EAGlB,MAAM,iCAAiC,CAAC;AASzC,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,2BAA2B,EAAE,OAAO,CAAC;IACrC,qBAAqB,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5D;AAGD,iBAAS,WAAW,CAAC,KAAK,EAAE,MAAM,eA8CjC;kBA9CQ,WAAW;;;AAgDpB,eAAe,WAAW,CAAC"}
|
|
@@ -42,7 +42,7 @@ function WizardAside(props) {
|
|
|
42
42
|
canUseSessionManagement && React.createElement(SessionRestore, { routeProps: props.routeProps }),
|
|
43
43
|
React.createElement(AsideResults, null),
|
|
44
44
|
canShowFileUploadWidget() && React.createElement(FileDiag, null),
|
|
45
|
-
React.createElement(AlertToastWrapper,
|
|
45
|
+
React.createElement(AlertToastWrapper, { submitCaseAndNavigate: props.submitCaseAndNavigate }))));
|
|
46
46
|
}
|
|
47
47
|
WizardAside.defaultProps = defaultProps;
|
|
48
48
|
export default WizardAside;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardLayout.tsx"],"names":[],"mappings":"AAQA,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,
|
|
1
|
+
{"version":3,"file":"WizardLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardLayout.tsx"],"names":[],"mappings":"AAQA,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,eAsJzC"}
|
|
@@ -62,7 +62,7 @@ export function WizardLayout(props) {
|
|
|
62
62
|
}
|
|
63
63
|
return isModalPresent;
|
|
64
64
|
};
|
|
65
|
-
const submitCaseAndNavigate = () => {
|
|
65
|
+
const submitCaseAndNavigate = (isReSubmitting) => {
|
|
66
66
|
confirmationModalType && setConfirmationModalType(null);
|
|
67
67
|
// if a confirmation modal exists, show it and don't submit the case as
|
|
68
68
|
// it will be handled by the confirmation modal itself
|
|
@@ -77,12 +77,13 @@ export function WizardLayout(props) {
|
|
|
77
77
|
submitCase(caseDispatch, caseState, sessionItem, isCaseCreate, errorMessageCaseSubmit500);
|
|
78
78
|
// reset viewedModals on case submit
|
|
79
79
|
viewedConfirmationModalsList.current = [];
|
|
80
|
-
|
|
80
|
+
!isReSubmitting &&
|
|
81
|
+
RouteUtils.navigateToSection(props.routeProps, appRouteConfugurations[activeSection].nextSection, appRouteSectionsSequence, isCaseCreate, isSearchIntent, false);
|
|
81
82
|
};
|
|
82
83
|
const onNext = (e) => {
|
|
83
84
|
var _a;
|
|
84
85
|
if (appRouteConfugurations[activeSection].nextSection === AppRouteSections.SUBMIT_CASE) {
|
|
85
|
-
submitCaseAndNavigate();
|
|
86
|
+
submitCaseAndNavigate(false);
|
|
86
87
|
return;
|
|
87
88
|
}
|
|
88
89
|
// confirmed state side support show modal logic
|
|
@@ -114,9 +115,9 @@ export function WizardLayout(props) {
|
|
|
114
115
|
setConfirmationModalType(null);
|
|
115
116
|
};
|
|
116
117
|
return (React.createElement(React.Fragment, null,
|
|
117
|
-
React.createElement(PreCaseConfirmationModals, { onModalClose: onModalClose, confirmationModalType: confirmationModalType, onConfirm: submitCaseAndNavigate }),
|
|
118
|
+
React.createElement(PreCaseConfirmationModals, { onModalClose: onModalClose, confirmationModalType: confirmationModalType, onConfirm: () => submitCaseAndNavigate(caseState.caseCreationError) }),
|
|
118
119
|
React.createElement(WizardProgress, { routeProps: props.routeProps, onNext: onNext }),
|
|
119
120
|
React.createElement(WizardMain, { routeProps: props.routeProps }),
|
|
120
121
|
React.createElement(WizardNavigation, { routeProps: props.routeProps, onNext: onNext }),
|
|
121
|
-
React.createElement(WizardAside, { isAttachmentUploadModalOpen: confirmationModalType === PreCaseConfirmationModalsEnum.NO_ATTACHMENT_MODAL, routeProps: props.routeProps })));
|
|
122
|
+
React.createElement(WizardAside, { isAttachmentUploadModalOpen: confirmationModalType === PreCaseConfirmationModalsEnum.NO_ATTACHMENT_MODAL, routeProps: props.routeProps, submitCaseAndNavigate: submitCaseAndNavigate })));
|
|
122
123
|
}
|
|
@@ -144,7 +144,8 @@ export declare enum CaseReducerConstants {
|
|
|
144
144
|
setSelectedCaseGroupUsers = "setSelectedCaseGroupUsers",
|
|
145
145
|
getCustomEmail = "getCustomEmail",
|
|
146
146
|
updateEmailList = "updateEmailList",
|
|
147
|
-
getVersionDetails = "getVersionDetails"
|
|
147
|
+
getVersionDetails = "getVersionDetails",
|
|
148
|
+
caseCreation500ErrorStatus = "caseCreation500ErrorStatus"
|
|
148
149
|
}
|
|
149
150
|
export declare const initialCaseState: ICaseState;
|
|
150
151
|
export interface ICaseState {
|
|
@@ -186,6 +187,7 @@ export interface ICaseState {
|
|
|
186
187
|
isFetchingSelectedNotificationContacts: boolean;
|
|
187
188
|
versionsDetails: IApiResponseDetails<IVersionsDetails[]>;
|
|
188
189
|
v3ClusterName?: string;
|
|
190
|
+
caseCreation500ErrorStatus: boolean;
|
|
189
191
|
}
|
|
190
192
|
export interface ICreateCasePayloadType extends ICaseState {
|
|
191
193
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseConstNTypes.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseConstNTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACjH,O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AkB,EAAE,mBAAmB,CAAC,YAAY,EAAE,CAAC,CAAC;IACxD,sBAAsB,EAAE,OAAO,CAAC;IAChC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,EAAE,SAAS,CAAC;IAC5B,0BAA0B,EAAE,OAAO,CAAC;IACpC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,oCAAoC,EAAE,OAAO,CAAC;IAC9C,sCAAsC,EAAE,OAAO,CAAC;IAChD,eAAe,EAAE,mBAAmB,CAAC,gBAAgB,EAAE,CAAC,CAAC;IACzD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0BAA0B,EAAE,OAAO,CAAC;CACvC;AAED,MAAM,WAAW,sBAAuB,SAAQ,UAAU;CAAG;AAC7D,oBAAY,eAAe,GAAG,OAAO,CAAC,oBAAoB,EAAE,sBAAsB,CAAC,CAAC;AACpF,oBAAY,uBAAuB,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;AAEhE,eAAO,MAAM,qCAAqC,+CAA+C,CAAC;AAClG,eAAO,MAAM,yCAAyC,+CAA+C,CAAC"}
|
|
@@ -93,6 +93,7 @@ export var CaseReducerConstants;
|
|
|
93
93
|
CaseReducerConstants["getCustomEmail"] = "getCustomEmail";
|
|
94
94
|
CaseReducerConstants["updateEmailList"] = "updateEmailList";
|
|
95
95
|
CaseReducerConstants["getVersionDetails"] = "getVersionDetails";
|
|
96
|
+
CaseReducerConstants["caseCreation500ErrorStatus"] = "caseCreation500ErrorStatus";
|
|
96
97
|
})(CaseReducerConstants || (CaseReducerConstants = {}));
|
|
97
98
|
export const initialCaseState = {
|
|
98
99
|
isCreatingCase: false,
|
|
@@ -172,6 +173,7 @@ export const initialCaseState = {
|
|
|
172
173
|
isFetchingSelectedNotificationContacts: true,
|
|
173
174
|
versionsDetails: getApiResourceObject([]),
|
|
174
175
|
v3ClusterName: '',
|
|
176
|
+
caseCreation500ErrorStatus: false,
|
|
175
177
|
};
|
|
176
178
|
export const ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = 'https://access.redhat.com/articles/5967811';
|
|
177
179
|
export const NON_ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = 'https://access.redhat.com/articles/5967831';
|
|
@@ -12,6 +12,18 @@ export declare const setCaseDetails: (dispatch: CaseReducerDispatchType, caseSta
|
|
|
12
12
|
export declare const setCaseState: (dispatch: CaseReducerDispatchType, caseState: Partial<ICaseState>) => void;
|
|
13
13
|
export declare const setNotifiedUser: (dispatch: CaseReducerDispatchType, selectedNotificationContacts: IContact[]) => void;
|
|
14
14
|
export declare const submitCase: (dispatch: CaseReducerDispatchType, caseDetails: ICaseState, sessionItem: ISessionItem, isCaseCreate: boolean, errorMessage500: string | JSX.Element) => Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Update case details if there is HTTP 500 error while submitting case
|
|
17
|
+
* @param dispatch CaseReducerDispatchType
|
|
18
|
+
* @param error Error
|
|
19
|
+
*/
|
|
20
|
+
export declare const updateCaseCreationErrorStatusOnError: (dispatch: CaseReducerDispatchType, error: any) => void;
|
|
21
|
+
/**
|
|
22
|
+
* Update `caseCreation500ErrorStatus` status
|
|
23
|
+
* @param dispatch CaseReducerDispatchType
|
|
24
|
+
* @param errorStatus Boolean
|
|
25
|
+
*/
|
|
26
|
+
export declare const updateCaseCreationErrorStatus: (dispatch: CaseReducerDispatchType, errorStatus: boolean) => void;
|
|
15
27
|
export declare const postCaseCreationProcessing: (dispatch: CaseReducerDispatchType, caseNumber: string, caseDetails: ICaseState) => Promise<void>;
|
|
16
28
|
export declare const postCepDetails: (dispatch: CaseReducerDispatchType, caseNumber: string, cepDetails: ICepDetails) => Promise<void>;
|
|
17
29
|
export declare const setCaseRecommendations: (dispatch: CaseReducerDispatchType, docs: ISolrRecommendation[], oldRecommendations: ICaseResourceLink[]) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseReducer.d.ts","sourceRoot":"","sources":["../../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CAAC,KAAK,EAAE,MAAM,KAAK,0BAA0B,EAAE,QAO5D;AAED,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,iBAiB1F;AAED,eAAO,MAAM,kBAAkB,aAAc,uBAAuB,QAAQ,OAAO,SAKlF,CAAC"}
|
|
@@ -54,7 +54,7 @@ export const caseReducer = (pState, action) => {
|
|
|
54
54
|
return Object.assign(Object.assign({}, pState), { caseDetails: Object.assign(Object.assign({}, pState.caseDetails), { caseNumber: null }), isCreatingCase: true, caseCreationError: false, caseCreationErrorMessage: '' });
|
|
55
55
|
}
|
|
56
56
|
case CaseReducerConstants.caseCreated: {
|
|
57
|
-
return Object.assign(Object.assign({}, pState), { caseDetails: Object.assign(Object.assign({}, pState.caseDetails), action.payload.caseDetails), isCreatingCase: false, caseCreationError: false, caseCreationErrorMessage: '' });
|
|
57
|
+
return Object.assign(Object.assign({}, pState), { caseDetails: Object.assign(Object.assign({}, pState.caseDetails), action.payload.caseDetails), isCreatingCase: false, caseCreationError: false, caseCreationErrorMessage: '', caseCreation500ErrorStatus: false });
|
|
58
58
|
}
|
|
59
59
|
case CaseReducerConstants.setCaseCreationError: {
|
|
60
60
|
return Object.assign(Object.assign({}, pState), { isCreatingCase: false, caseCreationError: true, caseCreationErrorMessage: action.payload.caseCreationErrorMessage });
|
|
@@ -127,6 +127,9 @@ export const caseReducer = (pState, action) => {
|
|
|
127
127
|
case CaseReducerConstants.getVersionDetails: {
|
|
128
128
|
return Object.assign(Object.assign({}, pState), { versionsDetails: action.payload.versionsDetails });
|
|
129
129
|
}
|
|
130
|
+
case CaseReducerConstants.caseCreation500ErrorStatus: {
|
|
131
|
+
return Object.assign(Object.assign({}, pState), { caseCreation500ErrorStatus: action.payload.caseCreation500ErrorStatus });
|
|
132
|
+
}
|
|
130
133
|
default: {
|
|
131
134
|
return pState;
|
|
132
135
|
}
|
|
@@ -155,12 +158,43 @@ export const submitCase = (dispatch, caseDetails, sessionItem, isCaseCreate, err
|
|
|
155
158
|
}
|
|
156
159
|
catch (error) {
|
|
157
160
|
const errorMessage = formattedApiErrorMessage(error, { '500': { message: errorMessage500 } });
|
|
161
|
+
// Set `caseCreationError` as true if there is HTTP 500 error
|
|
162
|
+
updateCaseCreationErrorStatusOnError(dispatch, error);
|
|
158
163
|
dispatch({
|
|
159
164
|
type: CaseReducerConstants.setCaseCreationError,
|
|
160
165
|
payload: { caseCreationErrorMessage: errorMessage },
|
|
161
166
|
});
|
|
162
167
|
}
|
|
163
168
|
});
|
|
169
|
+
/**
|
|
170
|
+
* Update case details if there is HTTP 500 error while submitting case
|
|
171
|
+
* @param dispatch CaseReducerDispatchType
|
|
172
|
+
* @param error Error
|
|
173
|
+
*/
|
|
174
|
+
export const updateCaseCreationErrorStatusOnError = (dispatch, error) => {
|
|
175
|
+
const errorCode = parseInt((error === null || error === void 0 ? void 0 : error.code) || (error === null || error === void 0 ? void 0 : error.status)) || '';
|
|
176
|
+
if (errorCode === 500) {
|
|
177
|
+
dispatch({
|
|
178
|
+
type: CaseReducerConstants.caseCreation500ErrorStatus,
|
|
179
|
+
payload: {
|
|
180
|
+
caseCreation500ErrorStatus: true,
|
|
181
|
+
},
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* Update `caseCreation500ErrorStatus` status
|
|
187
|
+
* @param dispatch CaseReducerDispatchType
|
|
188
|
+
* @param errorStatus Boolean
|
|
189
|
+
*/
|
|
190
|
+
export const updateCaseCreationErrorStatus = (dispatch, errorStatus) => {
|
|
191
|
+
dispatch({
|
|
192
|
+
type: CaseReducerConstants.caseCreation500ErrorStatus,
|
|
193
|
+
payload: {
|
|
194
|
+
caseCreation500ErrorStatus: errorStatus,
|
|
195
|
+
},
|
|
196
|
+
});
|
|
197
|
+
};
|
|
164
198
|
export const postCaseCreationProcessing = (dispatch, caseNumber, caseDetails) => __awaiter(void 0, void 0, void 0, function* () {
|
|
165
199
|
caseDetails.caseDetails.cep === true && postCepDetails(dispatch, caseNumber, caseDetails.cepDetails);
|
|
166
200
|
});
|
|
@@ -3,6 +3,7 @@ import { ICasePayload } from '@cee-eng/hydrajs/@types/api/public/case';
|
|
|
3
3
|
import { ISolrRecommendation } from '@cee-eng/hydrajs/@types/models/solr/solr';
|
|
4
4
|
import { ITopContent, ITopContentList } from '@cee-eng/hydrajs/@types/models/topContent/topContentModel';
|
|
5
5
|
import { IAction, IApiCreateState, IApiResponseDetails, IApiUpdateState } from '@rh-support/types/shared';
|
|
6
|
+
import { CaseReducerDispatchType } from './CaseConstNTypes';
|
|
6
7
|
export interface IPrevSessions {
|
|
7
8
|
[sessionId: string]: ISessionItem;
|
|
8
9
|
}
|
|
@@ -26,6 +27,7 @@ export interface ISessionRestoreState {
|
|
|
26
27
|
sessionUpdationStatus: IApiUpdateState;
|
|
27
28
|
sessionResourceTracking: ISessionResourcesTracking;
|
|
28
29
|
referrerUrl: string;
|
|
30
|
+
sessionOfCaseCreationError: ISessionItem | null;
|
|
29
31
|
}
|
|
30
32
|
export interface ISessionRestorePayloadType extends ISessionRestoreState {
|
|
31
33
|
sessionItem: ISessionItem;
|
|
@@ -46,12 +48,13 @@ export declare enum SessionRestoreConstants {
|
|
|
46
48
|
setSessionCreationState = "setSessionCreationState",
|
|
47
49
|
setSessionUpdationState = "setSessionUpdationState",
|
|
48
50
|
updateSessionResourceTracking = "updateSessionResourceTracking",
|
|
49
|
-
updatePreviousSessions = "updatePreviousSessions"
|
|
51
|
+
updatePreviousSessions = "updatePreviousSessions",
|
|
52
|
+
updateSessionOfCaseCreationError = "updateSessionOfCaseCreationError"
|
|
50
53
|
}
|
|
51
54
|
export declare const initialSessionRestoreState: ISessionRestoreState;
|
|
52
55
|
export declare type SessionRestoreDispatchType = (value: IActionType) => void;
|
|
53
56
|
export declare const sessionRestoreReducer: (state: ISessionRestoreState, action: IActionType) => ISessionRestoreState;
|
|
54
|
-
export declare const loadPreviousSessions: (dispatch: SessionReducerDispatchType) => Promise<void>;
|
|
57
|
+
export declare const loadPreviousSessions: (dispatch: SessionReducerDispatchType, caseDispatch: CaseReducerDispatchType) => Promise<void>;
|
|
55
58
|
export declare const createSession: (dispatch: SessionReducerDispatchType, sessionDetails: ISessionDetails, session: ISession) => Promise<void>;
|
|
56
59
|
export declare const updateSession: (dispatch: SessionReducerDispatchType, sessionId: string, sessionDetails?: ISessionDetails, session?: ISession) => Promise<void>;
|
|
57
60
|
export declare const updateActiveSessionId: (dispatch: SessionReducerDispatchType, activeSessionId: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionRestoreReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/SessionRestoreReducer.ts"],"names":[],"mappings":"AACA,OAAO,EACH,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,IAAI,sBAAsB,EAC/C,yBAAyB,IAAI,0BAA0B,EAC1D,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AACzG,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"SessionRestoreReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/SessionRestoreReducer.ts"],"names":[],"mappings":"AACA,OAAO,EACH,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,IAAI,sBAAsB,EAC/C,yBAAyB,IAAI,0BAA0B,EAC1D,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAA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M,oBACO,0BAA0B,6BAE7C,gBAKD,CAAC;AAEH,wBAAgB,oCAAoC,CAChD,IAAI,KAAA,EACJ,gBAAgB,EAAE,0BAA0B,GAC7C,gBAAgB,EAAE,CAIpB;AAID,eAAO,MAAM,YAAY,eACT,mBAAmB,mBACd,mBAAmB,EAAE,YAC7B,mBAAmB,EAAE,uBAWjC,CAAC"}
|
|
@@ -17,6 +17,7 @@ import forEach from 'lodash/forEach';
|
|
|
17
17
|
import isEmpty from 'lodash/isEmpty';
|
|
18
18
|
import map from 'lodash/map';
|
|
19
19
|
import uniqBy from 'lodash/uniqBy';
|
|
20
|
+
import { CaseReducerConstants } from './CaseConstNTypes';
|
|
20
21
|
const { getSessions, patchSession, createNewSession, createSessionResources, updateSessionResources, createSessionCepDetails, SessionResourceVisibility, } = pcm.preCase.session;
|
|
21
22
|
// Constants
|
|
22
23
|
export var SessionRestoreConstants;
|
|
@@ -29,6 +30,7 @@ export var SessionRestoreConstants;
|
|
|
29
30
|
SessionRestoreConstants["setSessionUpdationState"] = "setSessionUpdationState";
|
|
30
31
|
SessionRestoreConstants["updateSessionResourceTracking"] = "updateSessionResourceTracking";
|
|
31
32
|
SessionRestoreConstants["updatePreviousSessions"] = "updatePreviousSessions";
|
|
33
|
+
SessionRestoreConstants["updateSessionOfCaseCreationError"] = "updateSessionOfCaseCreationError";
|
|
32
34
|
})(SessionRestoreConstants || (SessionRestoreConstants = {}));
|
|
33
35
|
export const initialSessionRestoreState = {
|
|
34
36
|
previousSessions: getApiResourceObject({}),
|
|
@@ -38,6 +40,7 @@ export const initialSessionRestoreState = {
|
|
|
38
40
|
sessionUpdationStatus: getApiUpdationStatus(),
|
|
39
41
|
sessionResourceTracking: {},
|
|
40
42
|
referrerUrl: null,
|
|
43
|
+
sessionOfCaseCreationError: null,
|
|
41
44
|
};
|
|
42
45
|
// Reducers
|
|
43
46
|
export const sessionRestoreReducer = (state, action) => {
|
|
@@ -101,13 +104,16 @@ export const sessionRestoreReducer = (state, action) => {
|
|
|
101
104
|
newState.previousSessions.data = Object.assign(Object.assign({}, newState.previousSessions.data), action.payload.previousSessions.data);
|
|
102
105
|
return newState;
|
|
103
106
|
}
|
|
107
|
+
case SessionRestoreConstants.updateSessionOfCaseCreationError: {
|
|
108
|
+
return Object.assign(Object.assign({}, state), { sessionOfCaseCreationError: action.payload.sessionOfCaseCreationError });
|
|
109
|
+
}
|
|
104
110
|
default: {
|
|
105
111
|
return state;
|
|
106
112
|
}
|
|
107
113
|
}
|
|
108
114
|
};
|
|
109
115
|
// Function to Load Previous Session
|
|
110
|
-
export const loadPreviousSessions = (dispatch) => __awaiter(void 0, void 0, void 0, function* () {
|
|
116
|
+
export const loadPreviousSessions = (dispatch, caseDispatch) => __awaiter(void 0, void 0, void 0, function* () {
|
|
111
117
|
dispatch({
|
|
112
118
|
type: SessionRestoreConstants.getSessions,
|
|
113
119
|
payload: { previousSessions: getApiResourceObject({}, true), hasFetchedPreviousSessions: false },
|
|
@@ -119,9 +125,26 @@ export const loadPreviousSessions = (dispatch) => __awaiter(void 0, void 0, void
|
|
|
119
125
|
modifiedAfter: getPastUTCDateFromNow(30),
|
|
120
126
|
});
|
|
121
127
|
const prevSessions = {};
|
|
128
|
+
let foundSessionWithCaseCreationError = {};
|
|
122
129
|
for (const s of sessions) {
|
|
123
130
|
prevSessions[s.session.id] = s;
|
|
131
|
+
s.session.caseCreationError && (foundSessionWithCaseCreationError = s);
|
|
124
132
|
}
|
|
133
|
+
// If session is having `caseCreationError` true then update case details store.
|
|
134
|
+
!isEmpty(foundSessionWithCaseCreationError) &&
|
|
135
|
+
caseDispatch({
|
|
136
|
+
type: CaseReducerConstants.caseCreation500ErrorStatus,
|
|
137
|
+
payload: {
|
|
138
|
+
caseCreation500ErrorStatus: true,
|
|
139
|
+
},
|
|
140
|
+
});
|
|
141
|
+
!isEmpty(foundSessionWithCaseCreationError) &&
|
|
142
|
+
dispatch({
|
|
143
|
+
type: SessionRestoreConstants.updateSessionOfCaseCreationError,
|
|
144
|
+
payload: {
|
|
145
|
+
sessionOfCaseCreationError: foundSessionWithCaseCreationError,
|
|
146
|
+
},
|
|
147
|
+
});
|
|
125
148
|
dispatch({
|
|
126
149
|
type: SessionRestoreConstants.getSessions,
|
|
127
150
|
payload: { previousSessions: getApiResourceObject(prevSessions), hasFetchedPreviousSessions: true },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.117",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"lib/**/*"
|
|
27
27
|
],
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@cee-eng/hydrajs": "4.
|
|
29
|
+
"@cee-eng/hydrajs": "4.12.1",
|
|
30
30
|
"@cee-eng/ui-toolkit": "1.1.6",
|
|
31
31
|
"@patternfly/patternfly": "4.185.1",
|
|
32
32
|
"@patternfly/pfe-accordion": "1.12.3",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"react-virtualized": "^9.21.2"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@cee-eng/hydrajs": "4.
|
|
66
|
+
"@cee-eng/hydrajs": "4.12.1",
|
|
67
67
|
"@cee-eng/ui-toolkit": "1.1.6",
|
|
68
68
|
"@patternfly/patternfly": "4.185.1",
|
|
69
69
|
"@patternfly/pfe-accordion": "1.12.3",
|
|
@@ -73,12 +73,12 @@
|
|
|
73
73
|
"@patternfly/react-core": "4.202.16",
|
|
74
74
|
"@progress/kendo-drawing": "^1.6.0",
|
|
75
75
|
"@progress/kendo-react-pdf": "^3.12.0",
|
|
76
|
-
"@rh-support/api": "0.3.
|
|
77
|
-
"@rh-support/components": "1.1.
|
|
78
|
-
"@rh-support/react-context": "0.2.
|
|
76
|
+
"@rh-support/api": "0.3.22",
|
|
77
|
+
"@rh-support/components": "1.1.70",
|
|
78
|
+
"@rh-support/react-context": "0.2.75",
|
|
79
79
|
"@rh-support/types": "0.2.0",
|
|
80
|
-
"@rh-support/user-permissions": "0.2.
|
|
81
|
-
"@rh-support/utils": "0.2.
|
|
80
|
+
"@rh-support/user-permissions": "0.2.59",
|
|
81
|
+
"@rh-support/utils": "0.2.44",
|
|
82
82
|
"@types/react-redux": "^7.1.12",
|
|
83
83
|
"@types/redux": "^3.6.0",
|
|
84
84
|
"@webcomponents/webcomponentsjs": "^2.2.10",
|
|
@@ -143,5 +143,5 @@
|
|
|
143
143
|
"not ie <= 11",
|
|
144
144
|
"not op_mini all"
|
|
145
145
|
],
|
|
146
|
-
"gitHead": "
|
|
146
|
+
"gitHead": "079114145196d9af66c46a5047a0e0ecac32277b"
|
|
147
147
|
}
|