@rh-support/troubleshoot 2.3.0-alpha.0 → 2.4.5-beta.1
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/OwnerSelector.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/OwnerSelector.js +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +2 -2
- package/lib/esm/components/CaseEditView/CaseOverview/CaseType.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseType.js +18 -4
- package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +2 -2
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +4 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.js +2 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +6 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +3 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +4 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +95 -21
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +269 -137
- package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Fts.js +6 -5
- package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/Cep.js +3 -2
- package/lib/esm/components/CaseManagement/RHAssociatesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +11 -5
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +11 -5
- package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AsideResults.js +3 -1
- package/lib/esm/components/Recommendations/EARules/EARule.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/EARules/EARule.js +0 -2
- package/lib/esm/components/Recommendations/EARules/EARuleInfoInline.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/EARules/EARuleInfoInline.js +2 -2
- package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/Recommendations.js +19 -8
- package/lib/esm/components/SubmitCase/SubmitCase.js +3 -3
- package/lib/esm/components/Suggestions/TopContent.d.ts.map +1 -1
- package/lib/esm/components/Suggestions/TopContent.js +1 -4
- package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelector.d.ts +2 -2
- package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelector.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelector.js +10 -1
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +4 -1
- package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardMain.js +5 -0
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +35 -25
- package/lib/esm/hooks/useWizard.js +1 -1
- package/lib/esm/reducers/CaseReducer.d.ts +1 -1
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +13 -9
- package/lib/esm/reducers/SessionRestoreReducer.d.ts +1 -1
- package/lib/esm/reducers/SessionRestoreReducer.d.ts.map +1 -1
- package/lib/esm/reducers/SessionRestoreReducer.js +14 -121
- package/lib/esm/scss/_main.scss +2 -1
- package/lib/esm/scss/_pf-overrides.scss +6 -0
- package/package.json +11 -12
|
@@ -417,7 +417,7 @@ export const setCaseAccountNumber = (dispatch_1, accountNumber_1, ...args_1) =>
|
|
|
417
417
|
});
|
|
418
418
|
}
|
|
419
419
|
});
|
|
420
|
-
export const setCaseOwner = (dispatch_1, owner_1, product_1, abortSignalCaseGroup_1, abortSignalEntitlements_1, ...args_1) => __awaiter(void 0, [dispatch_1, owner_1, product_1, abortSignalCaseGroup_1, abortSignalEntitlements_1, ...args_1], void 0, function* (dispatch, owner, product, abortSignalCaseGroup, abortSignalEntitlements, setCaseGroupToUngroupedOrDefault = false, caseGroupNumberToRestore, canChangeGroup = true) {
|
|
420
|
+
export const setCaseOwner = (dispatch_1, owner_1, product_1, abortSignalCaseGroup_1, abortSignalEntitlements_1, ...args_1) => __awaiter(void 0, [dispatch_1, owner_1, product_1, abortSignalCaseGroup_1, abortSignalEntitlements_1, ...args_1], void 0, function* (dispatch, owner, product, abortSignalCaseGroup, abortSignalEntitlements, setCaseGroupToUngroupedOrDefault = false, caseGroupNumberToRestore, canChangeGroup = true, isUserUpdate, caseNumber) {
|
|
421
421
|
if (isEmpty(owner) || isEmpty(owner.ssoUsername)) {
|
|
422
422
|
dispatch({
|
|
423
423
|
type: CaseReducerConstants.caseDetailChanged,
|
|
@@ -451,7 +451,7 @@ export const setCaseOwner = (dispatch_1, owner_1, product_1, abortSignalCaseGrou
|
|
|
451
451
|
});
|
|
452
452
|
canChangeGroup &&
|
|
453
453
|
fetchCaseGroupsForSSO(dispatch, owner.ssoUsername, setCaseGroupToUngroupedOrDefault, abortSignalCaseGroup, caseGroupNumberToRestore);
|
|
454
|
-
fetchCaseEntitlements(dispatch, owner.ssoUsername, product, abortSignalEntitlements);
|
|
454
|
+
yield fetchCaseEntitlements(dispatch, owner.ssoUsername, product, abortSignalEntitlements, isUserUpdate, caseNumber);
|
|
455
455
|
});
|
|
456
456
|
//changing the item values to uppercase to match the backend values
|
|
457
457
|
const slaOrder = Object.values(SupportLevelDisplay).map((item) => {
|
|
@@ -472,7 +472,7 @@ const getHighestSLASubscription = (subs) => {
|
|
|
472
472
|
return currentIndex > highestIndex ? current : highest;
|
|
473
473
|
});
|
|
474
474
|
};
|
|
475
|
-
const fetchCaseEntitlements = (dispatch, ssoUserName, product, abortSignal) => __awaiter(void 0, void 0, void 0, function* () {
|
|
475
|
+
const fetchCaseEntitlements = (dispatch, ssoUserName, product, abortSignal, isUserUpdate, caseNumber) => __awaiter(void 0, void 0, void 0, function* () {
|
|
476
476
|
dispatch({
|
|
477
477
|
type: CaseReducerConstants.caseStateChanged,
|
|
478
478
|
payload: { ownersEntitlements: getApiResourceObject([], true) },
|
|
@@ -485,12 +485,16 @@ const fetchCaseEntitlements = (dispatch, ssoUserName, product, abortSignal) => _
|
|
|
485
485
|
type: CaseReducerConstants.caseStateChanged,
|
|
486
486
|
payload: { hasInvalidEntitlements, ownersEntitlements },
|
|
487
487
|
});
|
|
488
|
-
//
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
488
|
+
// Checking for the highest available support level for the user
|
|
489
|
+
if (isUserUpdate) {
|
|
490
|
+
const highest = getHighestSLASubscription(ownersEntitlements.data);
|
|
491
|
+
const caseDetails = { entitlementSla: highest.slaProcessId };
|
|
492
|
+
yield updateCaseDetails(dispatch, caseNumber, caseDetails);
|
|
493
|
+
dispatch({
|
|
494
|
+
type: CaseReducerConstants.caseDetailChanged,
|
|
495
|
+
payload: { caseDetails: { entitlementSla: highest.slaProcessId } },
|
|
496
|
+
});
|
|
497
|
+
}
|
|
494
498
|
}
|
|
495
499
|
catch (e) {
|
|
496
500
|
dispatch({
|
|
@@ -59,7 +59,7 @@ export type SessionRestoreDispatchType = (value: IActionType) => void;
|
|
|
59
59
|
export declare const sessionRestoreReducer: (state: ISessionRestoreState, action: IActionType) => ISessionRestoreState;
|
|
60
60
|
export declare const getIndividualSessionById: (dispatch: SessionReducerDispatchType, sessionId: string | undefined) => Promise<void>;
|
|
61
61
|
export declare const loadPreviousSessions: (dispatch: SessionReducerDispatchType, caseDispatch: CaseReducerDispatchType) => Promise<void>;
|
|
62
|
-
export declare const createSession: (dispatch: SessionReducerDispatchType, sessionDetails: ISessionDetails, session: ISession) => Promise<
|
|
62
|
+
export declare const createSession: (dispatch: SessionReducerDispatchType, sessionDetails: ISessionDetails, session: ISession) => Promise<string>;
|
|
63
63
|
export declare const updateSession: (dispatch: SessionReducerDispatchType, sessionId: string, sessionDetails: ISessionDetails, session?: ISession) => Promise<void>;
|
|
64
64
|
export declare const updateActiveSessionId: (dispatch: SessionReducerDispatchType, activeSessionId: string) => void;
|
|
65
65
|
export declare function getRelevantSessionFromSessions(dispatch: SessionReducerDispatchType, currentRelevantSessionId: string, previousSessions: IPrevSessions, caseDetails: Partial<ICasePayload>): string;
|
|
@@ -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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,gBAMD,CAAC;AAEH,wBAAgB,kBAAkB,CAC9B,IAAI,EAAE,mBAAmB,EAAE,EAC3B,gBAAgB,EAAE,0BAA0B,EAC5C,QAAQ,GAAE,MAAU,EACpB,WAAW,GAAE,MAAU,GACxB,gBAAgB,EAAE,CAMpB;AAGD,eAAO,MAAM,iBAAiB,QACrB,mBAAmB,oBACN,0BAA0B,SACtC,MAAM,KACb,gBAMD,CAAC;AAEH,eAAO,MAAM,mBAAmB,QACvB,MAAM,oBACO,0BAA0B,SACtC,MAAM,6BAEb,gBAMD,CAAC;AAEH,eAAO,MAAM,cAAc,gFAY1B,CAAC;AAEF,eAAO,MAAM,qBAAqB,gFAYjC,CAAC;AAGF,eAAO,MAAM,gBAAgB,QACpB,MAAM,oBACO,0BAA0B,SACtC,MAAM,6BAEb,gBAMD,CAAC;AAIH,eAAO,MAAM,YAAY,eACT,mBAAmB,mBACd,mBAAmB,EAAE,YAC7B,mBAAmB,EAAE,uBAWjC,CAAC"}
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { pcm } from '@cee-eng/hydrajs';
|
|
11
|
-
import {
|
|
11
|
+
import { getApiCreationStatus, getApiResourceObject, getApiUpdationStatus, getPastUTCDateFromNow, getResTypeFromUrl, promiseReflection, } from '@rh-support/utils';
|
|
12
12
|
import cloneDeep from 'lodash/cloneDeep';
|
|
13
13
|
import differenceBy from 'lodash/differenceBy';
|
|
14
14
|
import filter from 'lodash/filter';
|
|
@@ -16,17 +16,9 @@ import findIndex from 'lodash/findIndex';
|
|
|
16
16
|
import forEach from 'lodash/forEach';
|
|
17
17
|
import isEmpty from 'lodash/isEmpty';
|
|
18
18
|
import map from 'lodash/map';
|
|
19
|
-
import omit from 'lodash/omit';
|
|
20
|
-
import pick from 'lodash/pick';
|
|
21
19
|
import uniqBy from 'lodash/uniqBy';
|
|
22
20
|
import { CaseReducerConstants } from './CaseConstNTypes';
|
|
23
|
-
const {
|
|
24
|
-
// getSessions,
|
|
25
|
-
patchSession,
|
|
26
|
-
// createNewSession,
|
|
27
|
-
// createSessionResources,
|
|
28
|
-
// updateSessionResources,
|
|
29
|
-
createSessionCepDetails, SessionResourceVisibility, } = pcm.preCase.session;
|
|
21
|
+
const { getSessions, patchSession, createNewSession, createSessionResources, updateSessionResources, createSessionCepDetails, SessionResourceVisibility, } = pcm.preCase.session;
|
|
30
22
|
// Constants
|
|
31
23
|
export var SessionRestoreConstants;
|
|
32
24
|
(function (SessionRestoreConstants) {
|
|
@@ -134,10 +126,7 @@ export const getIndividualSessionById = (dispatch, sessionId) => __awaiter(void
|
|
|
134
126
|
if (isEmpty(sessionId))
|
|
135
127
|
return;
|
|
136
128
|
try {
|
|
137
|
-
|
|
138
|
-
// sessionId: sessionId,
|
|
139
|
-
// });
|
|
140
|
-
const sessions = yield getSessionByGraphql({
|
|
129
|
+
const sessions = yield getSessions({
|
|
141
130
|
sessionId: sessionId,
|
|
142
131
|
});
|
|
143
132
|
if (!isEmpty(sessions)) {
|
|
@@ -146,30 +135,6 @@ export const getIndividualSessionById = (dispatch, sessionId) => __awaiter(void
|
|
|
146
135
|
}
|
|
147
136
|
catch (error) { }
|
|
148
137
|
});
|
|
149
|
-
// transform graphql session data as per rest API
|
|
150
|
-
const transformGraphqlSessionToRestSession = (sessionResponse, isNodeValue = false) => {
|
|
151
|
-
const result = map(sessionResponse, (s) => {
|
|
152
|
-
const response = isNodeValue ? s === null || s === void 0 ? void 0 : s.node : s;
|
|
153
|
-
return {
|
|
154
|
-
session: omit(response, ['pcmSessionDetails', 'pcmSessionResource']),
|
|
155
|
-
sessionDetails: pick(response, ['pcmSessionDetails']).pcmSessionDetails,
|
|
156
|
-
};
|
|
157
|
-
});
|
|
158
|
-
console.log('transformGraphqlSessionToRestSession', result);
|
|
159
|
-
return result;
|
|
160
|
-
};
|
|
161
|
-
const getSessionByGraphql = (payload) => __awaiter(void 0, void 0, void 0, function* () {
|
|
162
|
-
var _a, _b;
|
|
163
|
-
const response = yield graphqlFetch({
|
|
164
|
-
query: GET_SESSION,
|
|
165
|
-
variables: {
|
|
166
|
-
filters: Object.assign({}, payload),
|
|
167
|
-
first: 3,
|
|
168
|
-
},
|
|
169
|
-
});
|
|
170
|
-
const sessions = transformGraphqlSessionToRestSession((_b = (_a = response === null || response === void 0 ? void 0 : response.pcm_session) === null || _a === void 0 ? void 0 : _a.edges) !== null && _b !== void 0 ? _b : [], true);
|
|
171
|
-
return sessions;
|
|
172
|
-
});
|
|
173
138
|
// Function to Load Previous Session
|
|
174
139
|
export const loadPreviousSessions = (dispatch, caseDispatch) => __awaiter(void 0, void 0, void 0, function* () {
|
|
175
140
|
dispatch({
|
|
@@ -177,17 +142,11 @@ export const loadPreviousSessions = (dispatch, caseDispatch) => __awaiter(void 0
|
|
|
177
142
|
payload: { previousSessions: getApiResourceObject({}, true), hasFetchedPreviousSessions: false },
|
|
178
143
|
});
|
|
179
144
|
try {
|
|
180
|
-
|
|
181
|
-
// isResolved: false,
|
|
182
|
-
// isActive: true,
|
|
183
|
-
// modifiedAfter: getPastUTCDateFromNow(30),
|
|
184
|
-
// });
|
|
185
|
-
const sessions = yield getSessionByGraphql({
|
|
145
|
+
const sessions = yield getSessions({
|
|
186
146
|
isResolved: false,
|
|
187
147
|
isActive: true,
|
|
188
148
|
modifiedAfter: getPastUTCDateFromNow(30),
|
|
189
149
|
});
|
|
190
|
-
console.log('sessions graphql', sessions);
|
|
191
150
|
const prevSessions = {};
|
|
192
151
|
let foundSessionWithCaseCreationError = {};
|
|
193
152
|
for (const s of sessions) {
|
|
@@ -226,25 +185,12 @@ export const loadPreviousSessions = (dispatch, caseDispatch) => __awaiter(void 0
|
|
|
226
185
|
});
|
|
227
186
|
// Function to Create Session
|
|
228
187
|
export const createSession = (dispatch, sessionDetails, session) => __awaiter(void 0, void 0, void 0, function* () {
|
|
229
|
-
var _a;
|
|
230
188
|
try {
|
|
231
189
|
dispatch({
|
|
232
190
|
type: SessionRestoreConstants.setSessionCreationState,
|
|
233
191
|
payload: { sessionCreationStatus: getApiCreationStatus(true) },
|
|
234
192
|
});
|
|
235
|
-
|
|
236
|
-
const response = yield graphqlFetch({
|
|
237
|
-
query: CREATE_SESSION,
|
|
238
|
-
variables: {
|
|
239
|
-
input: {
|
|
240
|
-
session,
|
|
241
|
-
sessionDetails,
|
|
242
|
-
},
|
|
243
|
-
},
|
|
244
|
-
});
|
|
245
|
-
console.log('CREATE_SESSION', response);
|
|
246
|
-
const newSession = transformGraphqlSessionToRestSession([(_a = response === null || response === void 0 ? void 0 : response.pcm_create_session) !== null && _a !== void 0 ? _a : []]);
|
|
247
|
-
const newSessionDetails = newSession === null || newSession === void 0 ? void 0 : newSession[0];
|
|
193
|
+
const newSessionDetails = yield createNewSession(sessionDetails, session);
|
|
248
194
|
setTimeout(() => createSessionCepDetails(newSessionDetails.session.id, {}), 2000);
|
|
249
195
|
dispatch({ type: SessionRestoreConstants.createSession, payload: { sessionItem: newSessionDetails } });
|
|
250
196
|
return newSessionDetails.session.id;
|
|
@@ -258,39 +204,13 @@ export const createSession = (dispatch, sessionDetails, session) => __awaiter(vo
|
|
|
258
204
|
}
|
|
259
205
|
});
|
|
260
206
|
// Function to Update Session
|
|
261
|
-
const updateSessionByGraphql = (sessionId, sessionDetails, session) => __awaiter(void 0, void 0, void 0, function* () {
|
|
262
|
-
var _a;
|
|
263
|
-
const response = yield graphqlFetch({
|
|
264
|
-
query: UPDATE_SESSION,
|
|
265
|
-
variables: {
|
|
266
|
-
input: {
|
|
267
|
-
session: omit(session, [
|
|
268
|
-
'hasVisitedResources',
|
|
269
|
-
'modifiedBy',
|
|
270
|
-
'modifiedDate',
|
|
271
|
-
'createdBy',
|
|
272
|
-
'createdDate',
|
|
273
|
-
'id',
|
|
274
|
-
]),
|
|
275
|
-
sessionDetails,
|
|
276
|
-
sessionId,
|
|
277
|
-
},
|
|
278
|
-
},
|
|
279
|
-
});
|
|
280
|
-
console.log('UPDATE_SESSION', response === null || response === void 0 ? void 0 : response.pcm_updateSession);
|
|
281
|
-
const updatedNewSession = transformGraphqlSessionToRestSession([(_a = response === null || response === void 0 ? void 0 : response.pcm_update_session) !== null && _a !== void 0 ? _a : []]);
|
|
282
|
-
const updatedSession = updatedNewSession === null || updatedNewSession === void 0 ? void 0 : updatedNewSession[0];
|
|
283
|
-
return updatedSession;
|
|
284
|
-
});
|
|
285
207
|
export const updateSession = (dispatch, sessionId, sessionDetails, session) => __awaiter(void 0, void 0, void 0, function* () {
|
|
286
208
|
try {
|
|
287
209
|
dispatch({
|
|
288
210
|
type: SessionRestoreConstants.setSessionUpdationState,
|
|
289
211
|
payload: { sessionUpdationStatus: getApiUpdationStatus(true) },
|
|
290
212
|
});
|
|
291
|
-
|
|
292
|
-
const updatedSession = yield updateSessionByGraphql(sessionId, sessionDetails, session);
|
|
293
|
-
console.log('updatedSession1 graphql', updatedSession);
|
|
213
|
+
const updatedSession = yield patchSession(sessionId, sessionDetails, session);
|
|
294
214
|
// to set sessionDetails fn param used because the session api response removes the
|
|
295
215
|
// fields that have undefined value and it causes problem when we compare
|
|
296
216
|
// sessionDetails and caseDetails
|
|
@@ -332,8 +252,7 @@ export function getRelevantSessionFromSessions(dispatch, currentRelevantSessionI
|
|
|
332
252
|
}
|
|
333
253
|
else if (sessionItem && sessionItem.session.hasVisitedResources && sessionItem.session.isActive) {
|
|
334
254
|
// Mark session as inactive so that it doesn't bother us next time
|
|
335
|
-
|
|
336
|
-
updateSessionByGraphql(s, {}, { isActive: false });
|
|
255
|
+
patchSession(s, {}, { isActive: false });
|
|
337
256
|
// Mocking it as we don't really care if and when this call is made as long as we ignore these sessions in next iteration
|
|
338
257
|
const updatedSession = Object.assign(Object.assign({}, sessionItem), { session: Object.assign(Object.assign({}, sessionItem.session), { isActive: false }) });
|
|
339
258
|
dispatch({ type: SessionRestoreConstants.patchSession, payload: { sessionItem: updatedSession } });
|
|
@@ -387,7 +306,6 @@ export function createOrUpdateSessionResources(dispatch_1, activeSessionId_1, cu
|
|
|
387
306
|
// Create Session Resource Helper
|
|
388
307
|
export function createSessionResourcesLocal(dispatch_1, activeSessionId_1, currentSessionResourceTracking_1, source_1, payload_1) {
|
|
389
308
|
return __awaiter(this, arguments, void 0, function* (dispatch, activeSessionId, currentSessionResourceTracking, source, payload, resources = []) {
|
|
390
|
-
var _a;
|
|
391
309
|
if (isEmpty(payload) || isEmpty(activeSessionId) || isEmpty(source))
|
|
392
310
|
return;
|
|
393
311
|
const resourceTracking = currentSessionResourceTracking[source];
|
|
@@ -405,22 +323,12 @@ export function createSessionResourcesLocal(dispatch_1, activeSessionId_1, curre
|
|
|
405
323
|
presentedTabResources: filter(resources, (res) => res.visibilityStatus === SessionResourceVisibility.PRESENTED_TAB),
|
|
406
324
|
},
|
|
407
325
|
});
|
|
408
|
-
|
|
409
|
-
const response = yield graphqlFetch({
|
|
410
|
-
query: CREATE_SESSION_RESOURCE,
|
|
411
|
-
variables: {
|
|
412
|
-
input: {
|
|
413
|
-
sessionResources: resources,
|
|
414
|
-
resourceOrigin: { source, payload },
|
|
415
|
-
sessionId: activeSessionId,
|
|
416
|
-
},
|
|
417
|
-
},
|
|
418
|
-
});
|
|
326
|
+
const response = yield createSessionResources(activeSessionId, { source, payload }, resources);
|
|
419
327
|
dispatch({
|
|
420
328
|
type: SessionRestoreConstants.updateSessionResourceTracking,
|
|
421
329
|
payload: {
|
|
422
330
|
resourceSource: source,
|
|
423
|
-
resourceOriginId:
|
|
331
|
+
resourceOriginId: response.resourceOrigin.id,
|
|
424
332
|
},
|
|
425
333
|
});
|
|
426
334
|
}
|
|
@@ -450,26 +358,11 @@ export function updateSessionResourcesLocal(dispatch, activeSessionId, currentSe
|
|
|
450
358
|
!nonPreviouslyPresentedTabResources.length)
|
|
451
359
|
return;
|
|
452
360
|
try {
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
const response1 = yield graphqlFetch({
|
|
459
|
-
query: UPDATE_SESSION_RESOURCE,
|
|
460
|
-
variables: {
|
|
461
|
-
input: {
|
|
462
|
-
sessionResources: [
|
|
463
|
-
...nonPreviouslyVisitedResources,
|
|
464
|
-
...nonPreviouslyPresentedResources,
|
|
465
|
-
...nonPreviouslyPresentedTabResources,
|
|
466
|
-
],
|
|
467
|
-
resourceOriginId: resourceTracking.resourceOriginId,
|
|
468
|
-
sessionId: activeSessionId,
|
|
469
|
-
},
|
|
470
|
-
},
|
|
471
|
-
});
|
|
472
|
-
console.log('updateSessionResources', response1);
|
|
361
|
+
yield updateSessionResources(activeSessionId, { id: resourceTracking.resourceOriginId }, [
|
|
362
|
+
...nonPreviouslyVisitedResources,
|
|
363
|
+
...nonPreviouslyPresentedResources,
|
|
364
|
+
...nonPreviouslyPresentedTabResources,
|
|
365
|
+
]);
|
|
473
366
|
const payloadToDispatch = {
|
|
474
367
|
resourceSource: source,
|
|
475
368
|
sessionResourceTracking: {},
|
package/lib/esm/scss/_main.scss
CHANGED
|
@@ -1009,7 +1009,8 @@ svg.pf-v5-u-ml-xs.icon-size {
|
|
|
1009
1009
|
}
|
|
1010
1010
|
|
|
1011
1011
|
.case-internal-status-selector-text,
|
|
1012
|
-
.get-support-severity-modal-text
|
|
1012
|
+
.get-support-severity-modal-text,
|
|
1013
|
+
.case-type-selector-text {
|
|
1013
1014
|
.pf-v5-c-menu-toggle__text {
|
|
1014
1015
|
width: 100%;
|
|
1015
1016
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.5-beta.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"lib/**/*"
|
|
26
26
|
],
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@cee-eng/hydrajs": "4.17.
|
|
28
|
+
"@cee-eng/hydrajs": "4.17.27",
|
|
29
29
|
"@cee-eng/ui-toolkit": "1.1.8",
|
|
30
30
|
"@patternfly/patternfly": "5.4.0",
|
|
31
31
|
"@patternfly/react-core": "5.4.0",
|
|
@@ -51,8 +51,7 @@
|
|
|
51
51
|
"react-virtualized": "^9.22.5"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@
|
|
55
|
-
"@cee-eng/hydrajs": "4.17.26",
|
|
54
|
+
"@cee-eng/hydrajs": "4.17.27",
|
|
56
55
|
"@cee-eng/ui-toolkit": "1.1.8",
|
|
57
56
|
"@patternfly/patternfly": "5.4.0",
|
|
58
57
|
"@patternfly/react-core": "5.4.0",
|
|
@@ -61,17 +60,15 @@
|
|
|
61
60
|
"@progress/kendo-licensing": "1.3.5",
|
|
62
61
|
"@progress/kendo-react-pdf": "^5.16.0",
|
|
63
62
|
"@redux-devtools/extension": "^3.3.0",
|
|
64
|
-
"@rh-support/components": "2.
|
|
65
|
-
"@rh-support/react-context": "2.
|
|
63
|
+
"@rh-support/components": "2.1.93",
|
|
64
|
+
"@rh-support/react-context": "2.1.102",
|
|
66
65
|
"@rh-support/types": "2.0.5",
|
|
67
|
-
"@rh-support/user-permissions": "2.
|
|
68
|
-
"@rh-support/utils": "2.
|
|
69
|
-
"
|
|
70
|
-
"@types/redux": "^3.6.0",
|
|
66
|
+
"@rh-support/user-permissions": "2.1.57",
|
|
67
|
+
"@rh-support/utils": "2.1.46",
|
|
68
|
+
"date-fns": "^4.1.0",
|
|
71
69
|
"dompurify": "^2.2.6",
|
|
72
70
|
"dot": "^1.1.3",
|
|
73
71
|
"downshift": "^6.0.5",
|
|
74
|
-
"graphql": "^16.9.0",
|
|
75
72
|
"history": "4.10.1",
|
|
76
73
|
"i18next": "^23.15.0",
|
|
77
74
|
"js-markdown-extra": "^1.2.4",
|
|
@@ -106,7 +103,9 @@
|
|
|
106
103
|
"@types/react": "^18.2.20",
|
|
107
104
|
"@types/react-bootstrap-typeahead": "^5.1.3",
|
|
108
105
|
"@types/react-dom": "^18.2.18",
|
|
106
|
+
"@types/react-redux": "^7.1.33",
|
|
109
107
|
"@types/react-router-dom": "^5.1.2",
|
|
108
|
+
"@types/redux": "^3.6.0",
|
|
110
109
|
"faker": "^5.5.3",
|
|
111
110
|
"jest": "^29.7.0",
|
|
112
111
|
"jest-environment-jsdom": "^29.7.0"
|
|
@@ -135,5 +134,5 @@
|
|
|
135
134
|
"defaults and supports es6-module",
|
|
136
135
|
"maintained node versions"
|
|
137
136
|
],
|
|
138
|
-
"gitHead": "
|
|
137
|
+
"gitHead": "91b8d4959b93c0227d070e881682d84d6d4eeac1"
|
|
139
138
|
}
|