@rh-support/troubleshoot 2.2.132 → 2.2.134

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.
Files changed (34) hide show
  1. package/lib/esm/components/CaseEditView/Case.js +2 -2
  2. package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
  3. package/lib/esm/components/CaseEditView/CaseOverview/index.js +2 -1
  4. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
  5. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +9 -8
  6. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts +1 -0
  7. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts.map +1 -1
  8. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +1 -1
  9. package/lib/esm/components/CaseEditView/CaseSolutions/HandpicketItem.d.ts +1 -0
  10. package/lib/esm/components/CaseEditView/CaseSolutions/HandpicketItem.d.ts.map +1 -1
  11. package/lib/esm/components/CaseEditView/CaseSolutions/HandpicketItem.js +1 -1
  12. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
  13. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +4 -2
  14. package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
  15. package/lib/esm/components/CaseInformation/CaseGroup.js +9 -3
  16. package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
  17. package/lib/esm/components/CaseInformation/Fts.js +19 -2
  18. package/lib/esm/components/Recommendations/EARules/EARule.d.ts +1 -1
  19. package/lib/esm/components/Recommendations/EARules/EARule.d.ts.map +1 -1
  20. package/lib/esm/components/Recommendations/EARules/EARule.js +5 -3
  21. package/lib/esm/components/Recommendations/EARules/EARuleInfoInline.d.ts.map +1 -1
  22. package/lib/esm/components/Recommendations/EARules/EARuleInfoInline.js +2 -2
  23. package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
  24. package/lib/esm/components/Recommendations/Recommendations.js +3 -2
  25. package/lib/esm/components/Suggestions/TopContent.d.ts.map +1 -1
  26. package/lib/esm/components/Suggestions/TopContent.js +4 -1
  27. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
  28. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +20 -2
  29. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  30. package/lib/esm/components/wizardLayout/WizardLayout.js +4 -2
  31. package/lib/esm/reducers/CaseReducer.d.ts +3 -3
  32. package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
  33. package/lib/esm/reducers/CaseReducer.js +30 -29
  34. package/package.json +6 -6
@@ -19,7 +19,7 @@ import { CaseDetailsWarningMessage } from './CaseDetailsWarningMessage';
19
19
  import CaseOverview from './CaseOverview';
20
20
  import { PDFContext } from './PDFContainer';
21
21
  export default function Case(props) {
22
- const { globalMetadataState: { loggedInUserRights, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
22
+ const { globalMetadataState: { loggedInUserRights, loggedInUsersAccount, loggedInUser }, } = useContext(GlobalMetadataStateContext);
23
23
  const caseDetailsPageDispatch = useCaseDetailsPageDispatchContext();
24
24
  const { t } = useTranslation();
25
25
  // The `path` lets us build <Route> paths that are
@@ -82,7 +82,7 @@ export default function Case(props) {
82
82
  return;
83
83
  }
84
84
  if (caseNumber) {
85
- fetchCaseDetails(caseDispatch, caseNumber, loggedInUserRights.data);
85
+ fetchCaseDetails(caseDispatch, caseNumber, loggedInUserRights.data, loggedInUser.data);
86
86
  canSeeRMEs &&
87
87
  fetchCaseEscalations(caseDetailsPageDispatch, caseNumber, loggedInUserRights.data.getAccountNumber());
88
88
  // fetch data in advance
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/index.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAkD,MAAM,OAAO,CAAC;AA6BvE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,MAAM,qBAwfjD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/index.tsx"],"names":[],"mappings":"AA6BA,OAAO,KAAkD,MAAM,OAAO,CAAC;AA6BvE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,MAAM,qBAyfjD"}
@@ -11,7 +11,7 @@ import { Alert, AlertVariant, Button, ButtonVariant, ExpandableSection, Label, M
11
11
  import { ToastNotification, useConfirmation } from '@rh-support/components';
12
12
  import { CloseCaseModal, fetchCaseSeverities, fetchCaseTypes, GlobalMetadataDispatchContext, GlobalMetadataStateContext, useCanEditCase, } from '@rh-support/react-context';
13
13
  import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
14
- import { haventLoadedMetadata, isOpenShiftOnlineProduct, PreviousCaseTypes, toNewCaseTypeMapper, toNewCaseTypeSwitcher, } from '@rh-support/utils';
14
+ import { dtmTrackEvent, haventLoadedMetadata, isOpenShiftOnlineProduct, PreviousCaseTypes, toNewCaseTypeMapper, toNewCaseTypeSwitcher, } from '@rh-support/utils';
15
15
  import isEqual from 'lodash/isEqual';
16
16
  import React, { useContext, useEffect, useRef, useState } from 'react';
17
17
  import { Trans, useTranslation } from 'react-i18next';
@@ -301,6 +301,7 @@ export default function CaseOverview(props) {
301
301
  yield updateStatusState(CaseStatusEnum.CLOSED);
302
302
  yield postCommentAfterStatusUpdate(commentBody);
303
303
  setShowCaseCloseModal(false);
304
+ dtmTrackEvent('case closed - case details page', caseNumber, product);
304
305
  }), isUpdating: (caseOverviewState.caseStatusUpdating && isCaseUpdating) || isPostingComment, onClose: () => {
305
306
  setShowCaseCloseModal(false);
306
307
  }, caseNumber: caseNumber })),
@@ -1 +1 @@
1
- {"version":3,"file":"CaseSolutions.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseSolutions/CaseSolutions.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAuE3E,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB,EAAE,OAAO,CAAC;CACnC;AAUD,eAAO,MAAM,aAAa,+EA4fxB,CAAC"}
1
+ {"version":3,"file":"CaseSolutions.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseSolutions/CaseSolutions.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAuE3E,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB,EAAE,OAAO,CAAC;CACnC;AAUD,eAAO,MAAM,aAAa,+EAkgBxB,CAAC"}
@@ -23,7 +23,7 @@ import { Accordion, AccordionContent, AccordionItem, AccordionToggle, Button, Mo
23
23
  import { PaginatedList, ToastNotification } from '@rh-support/components';
24
24
  import { useGlobalStateContext } from '@rh-support/react-context';
25
25
  import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
26
- import { getSolrParams } from '@rh-support/utils';
26
+ import { dtmTrackEvent, getSolrParams } from '@rh-support/utils';
27
27
  import find from 'lodash/find';
28
28
  import isEqual from 'lodash/isEqual';
29
29
  import some from 'lodash/some';
@@ -150,7 +150,7 @@ export const CaseSolutions = forwardRef((props, ref) => {
150
150
  };
151
151
  if (recommendationToUpdate.resourceViewURI)
152
152
  recommendation.resourceViewURI = recommendationToUpdate.resourceViewURI;
153
- // for some doc types like Errata we don't have resourceURI. If resourceURI was not avalable,
153
+ // for some doc types like Errata we don't have resourceURI. If resourceURI was not available,
154
154
  // we constructe a 'fake' one to be used when linking in SFDC
155
155
  recommendation.resourceURI = recommendationToUpdate.resourceURI
156
156
  ? recommendationToUpdate.resourceURI
@@ -163,6 +163,7 @@ export const CaseSolutions = forwardRef((props, ref) => {
163
163
  });
164
164
  const canPinUnpin = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_PIN_UNPIN_RESOURCES);
165
165
  const canLinkUnlink = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_LINK_UNLINK_RESOURCES);
166
+ const addDtmEvent = (eventName) => dtmTrackEvent(eventName, caseNumber, product);
166
167
  const updateRecommendations = (recommendationToUpdate, isPinned, isLinked) => () => __awaiter(void 0, void 0, void 0, function* () {
167
168
  try {
168
169
  setIsPinLoading((prevPiningMap) => (Object.assign(Object.assign({}, prevPiningMap), { [recommendationToUpdate.resourceId]: true })));
@@ -267,17 +268,17 @@ export const CaseSolutions = forwardRef((props, ref) => {
267
268
  }
268
269
  }, [allDocs, isFetchingCaseDetails, isLoadingRecommendations, recomendationsObj]);
269
270
  const renderTopRecommendations = (recommendation, index, type) => (React.createElement(React.Fragment, null,
270
- canPinUnpin && (React.createElement(CaseSolutionsItem, { showPin: true, type: type, pinTitle: recommendation.isPinned ? t('Unpin') : t('Pin'), isPinLoading: isPinLoading, index: index, recommendation: recommendation, onPinClicked: updateRecommendations(recommendation, recommendation.isPinned, undefined) })),
271
- canLinkUnlink && (React.createElement(CaseSolutionsItem, { showLink: true, type: type, pinTitle: recommendation.isLinked ? t('Unlink') : t('Link'), isPinLoading: isPinLoading, index: index, recommendation: recommendation, onPinClicked: updateRecommendations(recommendation, undefined, recommendation.isLinked) }))));
271
+ canPinUnpin && (React.createElement(CaseSolutionsItem, { showPin: true, type: type, pinTitle: recommendation.isPinned ? t('Unpin') : t('Pin'), isPinLoading: isPinLoading, index: index, recommendation: recommendation, onPinClicked: updateRecommendations(recommendation, recommendation.isPinned, undefined), onLinkClick: (name) => addDtmEvent(name) })),
272
+ canLinkUnlink && (React.createElement(CaseSolutionsItem, { showLink: true, type: type, pinTitle: recommendation.isLinked ? t('Unlink') : t('Link'), isPinLoading: isPinLoading, index: index, recommendation: recommendation, onPinClicked: updateRecommendations(recommendation, undefined, recommendation.isLinked), onLinkClick: (name) => addDtmEvent(name) }))));
272
273
  // customer logged in: we show pins and perform pin/unpin
273
- const renderPinsByCustomer = (recommendation, index, type) => (React.createElement(CaseSolutionsItem, { showPin: true, isPinned: true, type: type, pinTitle: recommendation.isPinned ? t('Unpin') : t('Pin'), isPinLoading: isPinLoading, index: index, recommendation: recommendation, onPinClicked: updateRecommendations(recommendation, recommendation.isPinned, undefined) }));
274
+ const renderPinsByCustomer = (recommendation, index, type) => (React.createElement(CaseSolutionsItem, { showPin: true, isPinned: true, type: type, pinTitle: recommendation.isPinned ? t('Unpin') : t('Pin'), isPinLoading: isPinLoading, index: index, recommendation: recommendation, onPinClicked: updateRecommendations(recommendation, recommendation.isPinned, undefined), onLinkClick: (name) => addDtmEvent(name) }));
274
275
  // customer logged in: we show links but perform pin/unpin
275
- const renderHandpickedCustomerView = (recommendation, index, type) => (React.createElement(HandpickedItem, { type: type, caseNumber: props.caseNumber, pinTitle: recommendation.isPinnedAndLinked ? t('Unpin') : t('Pin'), isPinLoading: isPinLoading, index: index, recommendation: recommendation, onRecommendationLike: () => setIsCloseCaseModalOpen(true) }));
276
+ const renderHandpickedCustomerView = (recommendation, index, type) => (React.createElement(HandpickedItem, { type: type, caseNumber: props.caseNumber, pinTitle: recommendation.isPinnedAndLinked ? t('Unpin') : t('Pin'), isPinLoading: isPinLoading, index: index, recommendation: recommendation, onRecommendationLike: () => setIsCloseCaseModalOpen(true), onLinkClick: (name) => addDtmEvent(name) }));
276
277
  // redhatter logged in: we show pins but perform link/unlink
277
- const renderPinnedByCustomerRedhatterView = (recommendation, index, type) => (React.createElement(CaseSolutionsItem, { showLink: true, type: type, pinTitle: recommendation.isPinnedAndLinked ? t('Unpin') : t('Pin'), isPinLoading: isPinLoading, index: index, recommendation: recommendation, onPinClicked: updateRecommendations(recommendation, undefined, recommendation.isLinked) }));
278
+ const renderPinnedByCustomerRedhatterView = (recommendation, index, type) => (React.createElement(CaseSolutionsItem, { showLink: true, type: type, pinTitle: recommendation.isPinnedAndLinked ? t('Unpin') : t('Pin'), isPinLoading: isPinLoading, index: index, recommendation: recommendation, onPinClicked: updateRecommendations(recommendation, undefined, recommendation.isLinked), onLinkClick: (name) => addDtmEvent(name) }));
278
279
  // redhatter logged in: we show links and perform link/unlink
279
280
  const renderHandPickedByRedHatter = (recommendation, index, type) => (React.createElement("div", { className: "pf-v5-u-ml-lg" },
280
- React.createElement(CaseSolutionsItem, { showLink: true, type: type, pinTitle: recommendation.isLinked ? t('Unlink') : t('Link'), isPinLoading: isPinLoading, index: index, recommendation: recommendation, onPinClicked: updateRecommendations(recommendation, undefined, recommendation.isLinked) })));
281
+ React.createElement(CaseSolutionsItem, { showLink: true, type: type, pinTitle: recommendation.isLinked ? t('Unlink') : t('Link'), isPinLoading: isPinLoading, index: index, recommendation: recommendation, onPinClicked: updateRecommendations(recommendation, undefined, recommendation.isLinked), onLinkClick: (name) => addDtmEvent(name) })));
281
282
  const linkedRecommendations = recommendations.filter((r) => r.isLinked);
282
283
  const pinnedRecommendations = recommendations.filter((r) => r.isPinned);
283
284
  const closeCaseModal = (React.createElement(Modal, { variant: ModalVariant.small, title: t('Did this solve your case?'), isOpen: isCloseCaseModalOpen && caseStatus !== CaseStatusEnum.CLOSED, onClose: () => setIsCloseCaseModalOpen(false), actions: [
@@ -11,6 +11,7 @@ interface IProps {
11
11
  isPinLoading: any;
12
12
  onPinClicked: () => void;
13
13
  type: string;
14
+ onLinkClick: (name: string) => void;
14
15
  }
15
16
  export interface ICaseDetailAsideRecommendation extends Partial<ICaseResourceLink> {
16
17
  isPinned?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"CaseSolutionsItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseSolutions/CaseSolutionsItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAQ5E,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,UAAU,MAAM;IACZ,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,8BAA8B,CAAC;IAC/C,YAAY,EAAE,GAAG,CAAC;IAClB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,8BAA+B,SAAQ,OAAO,CAAC,iBAAiB,CAAC;IAC9E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,0BAA0B,CAAC;CACnD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,qBAsD9C"}
1
+ {"version":3,"file":"CaseSolutionsItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseSolutions/CaseSolutionsItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAQ5E,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,UAAU,MAAM;IACZ,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,8BAA8B,CAAC;IAC/C,YAAY,EAAE,GAAG,CAAC;IAClB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED,MAAM,WAAW,8BAA+B,SAAQ,OAAO,CAAC,iBAAiB,CAAC;IAC9E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,0BAA0B,CAAC;CACnD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,qBAuD9C"}
@@ -19,7 +19,7 @@ export function CaseSolutionsItem(props) {
19
19
  !isLoading && props.showLink && React.createElement(LinkIcon, null)),
20
20
  React.createElement("a", { href: props.recommendation.resourceViewURI, "data-tracking-id": `case-resource-${props.type}-link-${props.index}`, target: "_blank", rel: "noopener noreferrer", dangerouslySetInnerHTML: {
21
21
  __html: DOMPurify.sanitize(truncate(decodeMarkTag(props.recommendation.title || ''), maxTitleLength)),
22
- } })),
22
+ }, onClick: () => props.onLinkClick('case solution click') })),
23
23
  React.createElement("div", { className: "result-body", dangerouslySetInnerHTML: {
24
24
  __html: DOMPurify.sanitize(truncate(cleanupMarkDown(decodeMarkTag(props.recommendation.solutionAbstract || '')), maxAbstractLength)),
25
25
  } })));
@@ -8,6 +8,7 @@ interface IProps {
8
8
  isPinLoading: any;
9
9
  onRecommendationLike: () => void;
10
10
  type: string;
11
+ onLinkClick: (name: string) => void;
11
12
  }
12
13
  export declare function HandpickedItem(props: IProps): React.JSX.Element;
13
14
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"HandpicketItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseSolutions/HandpicketItem.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,OAAO,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAC;AAErE,UAAU,MAAM;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,8BAA8B,CAAC;IAC/C,YAAY,EAAE,GAAG,CAAC;IAClB,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,qBAwH3C"}
1
+ {"version":3,"file":"HandpicketItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseSolutions/HandpicketItem.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,OAAO,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAC;AAErE,UAAU,MAAM;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,8BAA8B,CAAC;IAC/C,YAAY,EAAE,GAAG,CAAC;IAClB,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,qBAyH3C"}
@@ -62,7 +62,7 @@ export function HandpickedItem(props) {
62
62
  React.createElement("div", { className: "recommendation-header" },
63
63
  React.createElement("a", { href: recommendation.resourceViewURI, "data-tracking-id": `case-resource-${props.type}-link-${props.index}`, target: "_blank", rel: "noopener noreferrer", dangerouslySetInnerHTML: {
64
64
  __html: DOMPurify.sanitize(truncate(decodeMarkTag(recommendation.title || ''), maxTitleLength)),
65
- } })),
65
+ }, onClick: () => props.onLinkClick('recommendation hand picked click') })),
66
66
  React.createElement("div", { className: "result-body", dangerouslySetInnerHTML: {
67
67
  __html: DOMPurify.sanitize(truncate(cleanupMarkDown(decodeMarkTag(props.recommendation.solutionAbstract || '')), maxAbstractLength)),
68
68
  } }),
@@ -1 +1 @@
1
- {"version":3,"file":"CaseDiscussion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,YAAY,EAA0B,MAAM,yCAAyC,CAAC;AAa1G,OAAO,KAAoE,MAAM,OAAO,CAAC;AAsCzF,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,YAAY,EAAE,CAAC;IAC7B,SAAS,EAAE,SAAS,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;IAC/C,eAAe,EAAE,OAAO,CAAC;CAC5B;AAOD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,MAAM,qBAwmBnD"}
1
+ {"version":3,"file":"CaseDiscussion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,YAAY,EAA0B,MAAM,yCAAyC,CAAC;AAa1G,OAAO,KAAoE,MAAM,OAAO,CAAC;AAsCzF,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,YAAY,EAAE,CAAC;IAC7B,SAAS,EAAE,SAAS,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;IAC/C,eAAe,EAAE,OAAO,CAAC;CAC5B;AAOD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,MAAM,qBA0mBnD"}
@@ -12,7 +12,7 @@ import { MenuToggle, Select, SelectList, SelectOption } from '@patternfly/react-
12
12
  import { AlertMessage, AlertType, ErrorBoundary, LoadingIndicator, ToastNotification } from '@rh-support/components';
13
13
  import { useGlobalStateContext } from '@rh-support/react-context';
14
14
  import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
15
- import { getDropdownBtnPlaceholder, getUrlParsedParams, scrollIntoView } from '@rh-support/utils';
15
+ import { dtmTrackEvent, getDropdownBtnPlaceholder, getUrlParsedParams, scrollIntoView } from '@rh-support/utils';
16
16
  import cloneDeep from 'lodash/cloneDeep';
17
17
  import filter from 'lodash/filter';
18
18
  import findIndex from 'lodash/findIndex';
@@ -43,9 +43,10 @@ let cellMeasureCache = new CellMeasurerCache({
43
43
  });
44
44
  export default function CaseDiscussion(props) {
45
45
  const { t } = useTranslation();
46
- const { isPostingRemoteRequestCommentCompleted, screenSessionRequested } = useCaseSelector((state) => ({
46
+ const { isPostingRemoteRequestCommentCompleted, screenSessionRequested, product } = useCaseSelector((state) => ({
47
47
  isPostingRemoteRequestCommentCompleted: state.isPostingRemoteRequestCommentCompleted,
48
48
  screenSessionRequested: state.caseDetails.screenSessionRequested,
49
+ product: state.caseDetails.product,
49
50
  }), isEqual);
50
51
  const urlSearchParams = getUrlParsedParams(useLocation().search);
51
52
  const discussionIdFromUrl = ((urlSearchParams === null || urlSearchParams === void 0 ? void 0 : urlSearchParams.commentId) ||
@@ -169,6 +170,7 @@ export default function CaseDiscussion(props) {
169
170
  };
170
171
  const onCommentAdded = () => __awaiter(this, void 0, void 0, function* () {
171
172
  yield updateDiscussionStateComments(dispatchDiscussion, caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
173
+ dtmTrackEvent('comment', caseNumber, product);
172
174
  });
173
175
  const onAttachmentAdded = () => __awaiter(this, void 0, void 0, function* () {
174
176
  yield updateDiscussionStateAttachments(dispatchDiscussion, caseNumber, allDiscussions, sort, loggedInUsersAccount.data.secureSupport, discussionFiltersListState);
@@ -1 +1 @@
1
- {"version":3,"file":"CaseGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/CaseGroup.tsx"],"names":[],"mappings":"AASA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAW/D,UAAU,MAAM;IACZ,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAWD,iBAAS,SAAS,CAAC,KAAK,EAAE,MAAM,qBAyP/B;AAED,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"CaseGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/CaseGroup.tsx"],"names":[],"mappings":"AASA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAW/D,UAAU,MAAM;IACZ,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAWD,iBAAS,SAAS,CAAC,KAAK,EAAE,MAAM,qBAkQ/B;AAED,eAAe,SAAS,CAAC"}
@@ -33,7 +33,7 @@ const emptyCaseGroup = {
33
33
  function CaseGroup(props) {
34
34
  const { t } = useTranslation();
35
35
  const caseUpdateError = useCaseUpdateErrorMessage();
36
- const { groupNumber, caseNumber, accountNumber, selectedAccountDetails, ownersCaseGroups, groupName, isCaseOwnerUpdating, } = useCaseSelector((state) => ({
36
+ const { groupNumber, caseNumber, accountNumber, selectedAccountDetails, ownersCaseGroups, groupName, isCaseOwnerUpdating, contactSSOName, } = useCaseSelector((state) => ({
37
37
  caseNumber: state.caseDetails.caseNumber,
38
38
  groupNumber: state.caseDetails.groupNumber,
39
39
  accountNumber: state.caseDetails.accountNumberRef,
@@ -41,6 +41,7 @@ function CaseGroup(props) {
41
41
  selectedAccountDetails: state.selectedAccountDetails,
42
42
  groupName: state.caseDetails.groupName,
43
43
  isCaseOwnerUpdating: state.isCaseOwnerUpdating,
44
+ contactSSOName: state.caseDetails.contactSSOName,
44
45
  }), isEqual);
45
46
  const caseDispatch = useCaseDispatch();
46
47
  const { isExportingPDF } = useContext(PDFContext);
@@ -51,7 +52,7 @@ function CaseGroup(props) {
51
52
  const [isSelectedUngroupedInvalid, setIsSelectedUngroupedInvalid] = useState(false);
52
53
  const [isCaseGroupUpdating, setCaseGroupUpdating] = useState(false);
53
54
  const canEditCase = useCanEditCase();
54
- const { globalMetadataState: { loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
55
+ const { globalMetadataState: { loggedInUserRights, loggedInUser }, } = useContext(GlobalMetadataStateContext);
55
56
  // value changed logic to show a non local group change
56
57
  const [localGroupChange, setLocalGroupChange] = useState(false);
57
58
  const afterGroupLocalChange = () => setLocalGroupChange(false);
@@ -166,6 +167,10 @@ function CaseGroup(props) {
166
167
  });
167
168
  const showHelperText = !isSelectedUngroupedInvalid || (!isCaseGroupInvalid && !isGroupMandatory);
168
169
  const showEmptyValidationError = !caseNumber && isNextBtnClickedToShowValidationError && isCaseGroupInvalid;
170
+ const canNotChangeGroup = () => !loggedInUserRights.data.isInternal() &&
171
+ !loggedInUser.data.isOrgAdmin &&
172
+ loggedInUser.data.ssoUsername !== contactSSOName &&
173
+ !loggedInUserRights.data.isPartner();
169
174
  return (React.createElement("div", { className: "form-group" },
170
175
  React.createElement("label", { htmlFor: "get-support-group" },
171
176
  React.createElement(Trans, null, "Group"),
@@ -174,7 +179,8 @@ function CaseGroup(props) {
174
179
  React.createElement(Dropdown, { id: "get-support-group", searchable: (ownersCaseGroups.data || []).length > 10, onClearSelection: onCaseGroupClear, name: "get-support-group", placeholder: t(`Select a group`), title: t(`Select a group`), list: computeDropdownList(), selectedItem: toOption(selectedCaseGroup, { labelKey: 'name' }), disabled: ownersCaseGroups.isError ||
175
180
  ownersCaseGroups.isFetching ||
176
181
  isCaseGroupUpdating ||
177
- isCaseOwnerUpdating, isLoadingList: !isCaseOwnerUpdating && (ownersCaseGroups.isFetching || isCaseGroupUpdating), onChange: onCaseGroupChange, isInValid: ownersCaseGroups.isError || showEmptyValidationError || (caseNumber && isSelectedUngroupedInvalid), required: isGroupMandatory, onOuterClick: onOuterClickGroupCheck, "data-tracking-id": "get-support-group", isExportingPDF: isExportingPDF }),
182
+ isCaseOwnerUpdating ||
183
+ canNotChangeGroup(), isLoadingList: !isCaseOwnerUpdating && (ownersCaseGroups.isFetching || isCaseGroupUpdating), onChange: onCaseGroupChange, isInValid: ownersCaseGroups.isError || showEmptyValidationError || (caseNumber && isSelectedUngroupedInvalid), required: isGroupMandatory, onOuterClick: onOuterClickGroupCheck, "data-tracking-id": "get-support-group", isExportingPDF: isExportingPDF }),
178
184
  caseNumber && isSelectedUngroupedInvalid && !isExportingPDF && (React.createElement("p", { className: "form-instructions form-invalid" },
179
185
  React.createElement(Trans, null, "'Ungrouped Case' cannot be selected. Please select a group."))),
180
186
  showEmptyValidationError && isGroupMandatory && !isExportingPDF && (React.createElement("p", { className: "form-instructions form-invalid" },
@@ -1 +1 @@
1
- {"version":3,"file":"Fts.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Fts.tsx"],"names":[],"mappings":"AAWA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAS/D,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAQD,iBAAS,GAAG,CAAC,KAAK,EAAE,MAAM,qBAsLzB;kBAtLQ,GAAG;;;AAyLZ,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"Fts.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Fts.tsx"],"names":[],"mappings":"AAWA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAS/D,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAQD,iBAAS,GAAG,CAAC,KAAK,EAAE,MAAM,qBA2NzB;kBA3NQ,GAAG;;;AA8NZ,eAAe,GAAG,CAAC"}
@@ -27,13 +27,15 @@ const defaultProps = {
27
27
  function Fts(props) {
28
28
  const { t } = useTranslation();
29
29
  const caseUpdateError = useCaseUpdateErrorMessage();
30
- const { fts, contactInfo24x7, caseNumber, severity, entitlementSla, caseType } = useCaseSelector((state) => ({
30
+ const { fts, contactInfo24x7, caseNumber, severity, entitlementSla, caseType, phoneCountryCode, phoneAreaCodePrefixLineNumber, } = useCaseSelector((state) => ({
31
31
  fts: state.caseDetails.fts,
32
32
  caseNumber: state.caseDetails.caseNumber,
33
33
  contactInfo24x7: state.caseDetails.contactInfo24x7,
34
34
  severity: state.caseDetails.severity,
35
35
  entitlementSla: state.caseDetails.entitlementSla,
36
36
  caseType: state.caseDetails.caseType,
37
+ phoneCountryCode: state.caseDetails.phoneCountryCode,
38
+ phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber || '',
37
39
  }), isEqual);
38
40
  const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
39
41
  const { isExportingPDF } = useContext(PDFContext);
@@ -45,6 +47,7 @@ function Fts(props) {
45
47
  const [contactInfo24X7State, setFtsContact] = useState(contactInfo24x7);
46
48
  const [isFtsContactUpdating, setFtsContactUpdating] = useState(false);
47
49
  const [isFtsUpdating, setFtsUpdating] = useState(false);
50
+ const [contactSameAsOwner, setContactSameAsOwner] = useState(false);
48
51
  const canEditCase = useCanEditCase();
49
52
  const onCaseFtsContactUpdate = (caseDetails) => __awaiter(this, void 0, void 0, function* () {
50
53
  setFtsContactUpdating(true);
@@ -91,6 +94,17 @@ function Fts(props) {
91
94
  return;
92
95
  setContactInfoIntoGlobalState(e.target.value);
93
96
  };
97
+ const onSetContactSameAsOwner = (e) => {
98
+ if (canEditCase.alert())
99
+ return;
100
+ if (!e.target.checked) {
101
+ setContactSameAsOwner(false);
102
+ return;
103
+ }
104
+ setFtsContact(`${phoneCountryCode}-${phoneAreaCodePrefixLineNumber}`);
105
+ setContactInfoIntoGlobalState(`${phoneCountryCode}-${phoneAreaCodePrefixLineNumber}`);
106
+ setContactSameAsOwner(true);
107
+ };
94
108
  const onSave = (e) => __awaiter(this, void 0, void 0, function* () {
95
109
  setContactInfoIntoGlobalState(contactInfo24X7State);
96
110
  });
@@ -141,7 +155,10 @@ function Fts(props) {
141
155
  React.createElement(LoadingIndicator, { size: "sm", isInline: true, show: isFtsUpdating, className: "pf-v5-u-ml-sm" })),
142
156
  fts === true && (React.createElement(React.Fragment, null,
143
157
  React.createElement(InlineEdit, { formClassName: "pf-v5-u-mb-md", labelProps: { htmlFor: 'get-support-24-7-contact' }, labelContent: React.createElement(Trans, null, "24x7 Contact"), allowInlineEdit: props.inlineEditable && !disableFtsNContact, hideSaveCancel: props.hideSaveCancel, initialIsEditing: props.initialIsEditing, content: contactInfo24x7, onSave: onSave, onCancel: onCancel, saveDisabled: isSaveDisabled, loadingIndicator: isFtsContactUpdating ? React.createElement(LoadingIndicator, { isInline: true }) : undefined, isExportingPDF: isExportingPDF },
144
- React.createElement(TextAreaAutosize, { id: "get-support-24-7-contact", className: `form-control`, name: "get-support-24-7-contact", value: contactInfo24X7State, onChange: onFtsContactChange, disabled: disableFtsNContact, "data-tracking-id": "get-support-24-7-contact" }),
158
+ React.createElement("input", { type: "checkbox", id: "same-as-case-owner-phone", name: "same-as-case-owner-phone", "data-tracking-id": "same-as-case-owner-phone", checked: contactSameAsOwner, onChange: onSetContactSameAsOwner }),
159
+ React.createElement("label", { htmlFor: "same-as-case-owner-phone", className: "pf-v5-u-font-weight-normal pf-v5-u-font-size-md" },
160
+ React.createElement(Trans, null, "Same as case owner's phone number")),
161
+ React.createElement(TextAreaAutosize, { id: "get-support-24-7-contact", className: `form-control`, name: "get-support-24-7-contact", value: contactInfo24X7State, onChange: onFtsContactChange, disabled: disableFtsNContact || contactSameAsOwner, "data-tracking-id": "get-support-24-7-contact" }),
145
162
  React.createElement("p", { className: "form-instructions" },
146
163
  React.createElement(Trans, null, "Please provide contact information where you can be reached at any time to help you with your case."))),
147
164
  (contactInfo24X7State === null || contactInfo24X7State === void 0 ? void 0 : contactInfo24X7State.length) > CONTACT_INFO_24X7_LIMIT && (React.createElement("div", { className: "pull-top" },
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { IExtendedRule } from '../../../reducers/RulesReducer';
3
3
  interface IEARuleContext {
4
4
  rule: IExtendedRule;
5
- onCtaClick: (link: string) => (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void;
5
+ onCtaClick: (link: string, title?: string) => (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void;
6
6
  }
7
7
  export declare const EARuleContext: React.Context<IEARuleContext>;
8
8
  export declare function useEARuleContext(): IEARuleContext;
@@ -1 +1 @@
1
- {"version":3,"file":"EARule.d.ts","sourceRoot":"","sources":["../../../../../src/components/Recommendations/EARules/EARule.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAM1C,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,UAAU,cAAc;IACpB,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;CAClG;AAGD,eAAO,MAAM,aAAa,+BAGxB,CAAC;AAEH,wBAAgB,gBAAgB,mBAM/B;AACD,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;;;;CAAA,qBAoClD;AAED,iBAAS,WAAW,sBAGnB;AAED,iBAAS,iBAAiB,sBA0BzB;AAED,iBAAS,aAAa,CAAC,EAAE,SAA6B,EAAE,SAAc,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,qBA2BnH;AAED,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"EARule.d.ts","sourceRoot":"","sources":["../../../../../src/components/Recommendations/EARules/EARule.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAM1C,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,UAAU,cAAc;IACpB,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;CAClH;AAGD,eAAO,MAAM,aAAa,+BAGxB,CAAC;AAEH,wBAAgB,gBAAgB,mBAM/B;AACD,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;;;;CAAA,qBAqClD;AAED,iBAAS,WAAW,sBAGnB;AAED,iBAAS,iBAAiB,sBA0BzB;AAED,iBAAS,aAAa,CAAC,EAAE,SAA6B,EAAE,SAAc,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,qBA2BnH;AAED,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,aAAa,EAAE,CAAC"}
@@ -1,5 +1,6 @@
1
1
  /* eslint-disable @typescript-eslint/no-unused-vars */
2
2
  import { pcm } from '@cee-eng/hydrajs';
3
+ import { dtmTrackEvent } from '@rh-support/utils';
3
4
  import DOMPurify from 'dompurify';
4
5
  import isEqual from 'lodash/isEqual';
5
6
  import React, { useContext } from 'react';
@@ -28,8 +29,9 @@ export function EARule({ children, rule, ruleRank }) {
28
29
  summary: state.caseDetails.summary,
29
30
  }), isEqual);
30
31
  const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
31
- const onCtaClick = (link) => () => {
32
+ const onCtaClick = (link, title) => () => {
32
33
  createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.EDMOUND_ABOTT, [getSessResFromEA(link, SessionResourceVisibility.VISITED, ruleRank, rule.rule_id)], JSON.stringify({ product, version, summary }));
34
+ dtmTrackEvent(`insight rule button click: ${title}`, undefined, product);
33
35
  };
34
36
  return (React.createElement(EARuleContext.Provider, { value: {
35
37
  rule,
@@ -60,8 +62,8 @@ function EARuleArticle({ linkTitle = 'Related Article', className = '' }) {
60
62
  const { getTrackingULRWithQueryParams } = useParseRuleMarkdown();
61
63
  if (!rule.cta)
62
64
  return null;
63
- return linkTitle === 'View details' ? (React.createElement("a", { className: `se-recommended ts-known-vuln ${className}`, rel: "noopener noreferrer", target: "_blank", "data-tracking-id": "se-recommended-asa-rule", onClick: onCtaClick(rule.cta), href: getTrackingULRWithQueryParams(rule.cta, SessionResourceSource.EDMOUND_ABOTT) },
64
- React.createElement(Trans, null, linkTitle))) : (React.createElement("a", { className: `se-recommended ts-known-vuln ${className}`, rel: "noopener noreferrer", target: "_blank", "data-tracking-id": "se-recommended-asa-rule", onClick: onCtaClick(rule.cta), href: getTrackingULRWithQueryParams(rule.cta, SessionResourceSource.EDMOUND_ABOTT) },
65
+ return linkTitle === 'View details' ? (React.createElement("a", { className: `se-recommended ts-known-vuln ${className}`, rel: "noopener noreferrer", target: "_blank", "data-tracking-id": "se-recommended-asa-rule", onClick: onCtaClick(rule.cta, linkTitle), href: getTrackingULRWithQueryParams(rule.cta, SessionResourceSource.EDMOUND_ABOTT) },
66
+ React.createElement(Trans, null, linkTitle))) : (React.createElement("a", { className: `se-recommended ts-known-vuln ${className}`, rel: "noopener noreferrer", target: "_blank", "data-tracking-id": "se-recommended-asa-rule", onClick: onCtaClick(rule.cta, linkTitle), href: getTrackingULRWithQueryParams(rule.cta, SessionResourceSource.EDMOUND_ABOTT) },
65
67
  React.createElement(Trans, null, linkTitle)));
66
68
  }
67
69
  export { EARuleTitle, EARuleDescription, EARuleArticle };
@@ -1 +1 @@
1
- {"version":3,"file":"EARuleInfoInline.d.ts","sourceRoot":"","sources":["../../../../../src/components/Recommendations/EARules/EARuleInfoInline.tsx"],"names":[],"mappings":"AAUA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,OAAO,EAAE,aAAa,EAAkD,MAAM,gCAAgC,CAAC;AAO/G,UAAU,MAAM;IACZ,OAAO,EAAE,aAAa,EAAE,CAAC;CAC5B;AAED,wBAAgB,gBAAgB,CAAC,EAAE,OAAY,EAAE,EAAE,MAAM,qBAwJxD"}
1
+ {"version":3,"file":"EARuleInfoInline.d.ts","sourceRoot":"","sources":["../../../../../src/components/Recommendations/EARules/EARuleInfoInline.tsx"],"names":[],"mappings":"AAUA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,OAAO,EAAE,aAAa,EAAkD,MAAM,gCAAgC,CAAC;AAO/G,UAAU,MAAM;IACZ,OAAO,EAAE,aAAa,EAAE,CAAC;CAC5B;AAED,wBAAgB,gBAAgB,CAAC,EAAE,OAAY,EAAE,EAAE,MAAM,qBA2JxD"}
@@ -14,7 +14,7 @@ import CloseIcon from '@patternfly/react-icons/dist/js/icons/close-icon';
14
14
  import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
15
15
  import { PaginationCompact, useFetch } from '@rh-support/components';
16
16
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
17
- import { getResTypeFromUrl, getStyleVariantColor, StyleVariants } from '@rh-support/utils';
17
+ import { dtmTrackEvent, getResTypeFromUrl, getStyleVariantColor, StyleVariants } from '@rh-support/utils';
18
18
  import isEqual from 'lodash/isEqual';
19
19
  import some from 'lodash/some';
20
20
  import React, { useContext, useEffect, useState } from 'react';
@@ -102,7 +102,7 @@ export function EARuleInfoInline({ eaRules = [] }) {
102
102
  React.createElement(EARuleTitle, null))),
103
103
  React.createElement("div", { className: "pf-v5-c-alert__action" },
104
104
  React.createElement(Button, { style: { fontSize: 15 }, variant: ButtonVariant.link, "data-tracking-id": "se-recommended-asa-ignore", type: "button", onClick: onIgnoreBtnClick }, validEARulesLength > 1 ? React.createElement(Trans, null, "Skip") : React.createElement(CloseIcon, null))),
105
- React.createElement("div", { className: "pf-v5-c-alert__description" },
105
+ React.createElement("div", { className: "pf-v5-c-alert__description", onClick: () => dtmTrackEvent('insight rule description click', undefined, product) },
106
106
  React.createElement(EARuleDescription, null)),
107
107
  React.createElement("div", { className: "pf-v5-c-alert__action-group pf-v5-u-display-flex" },
108
108
  React.createElement(EARuleArticle, { className: "pf-v5-u-align-self-center pf-v5-u-mr-sm", linkTitle: "View details" }),
@@ -1 +1 @@
1
- {"version":3,"file":"Recommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/Recommendations.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AAelE,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAWpF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,qBAqQpD"}
1
+ {"version":3,"file":"Recommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/Recommendations.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AAelE,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAWpF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,qBAsQpD"}
@@ -2,7 +2,7 @@ import { pcm } from '@cee-eng/hydrajs';
2
2
  import { Label, Pagination, PaginationVariant } from '@patternfly/react-core';
3
3
  import { LoadingDots, useDebounce, usePrevious } from '@rh-support/components';
4
4
  import { useGlobalStateContext } from '@rh-support/react-context';
5
- import { computeRecommendationAbstract, computeRecommendationTitle, formatDate, scrollIntoView, } from '@rh-support/utils';
5
+ import { computeRecommendationAbstract, computeRecommendationTitle, dtmTrackEvent, formatDate, scrollIntoView, } from '@rh-support/utils';
6
6
  import differenceBy from 'lodash/differenceBy';
7
7
  import isEmpty from 'lodash/isEmpty';
8
8
  import isEqual from 'lodash/isEqual';
@@ -133,7 +133,8 @@ export default function Recommendations(props) {
133
133
  createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.RECOMMENDATIONS, [
134
134
  getSessResFromRec(doc, SessionResourceVisibility.VISITED, index + 1 + (pageSize || DEFAULTPAGESIZE) * ((recommendationState.currentPage || 1) - 1)),
135
135
  ], JSON.stringify(payload));
136
- }; //
136
+ dtmTrackEvent('recommendation click', caseNumber, product);
137
+ };
137
138
  return (React.createElement(React.Fragment, null,
138
139
  React.createElement(LoadingDots, { className: "recommendation-loading-dots", show: recommendationState.isLoadingRecommendations && !isEmpty(summary) }),
139
140
  React.createElement("div", { className: "recommendation-list pf-v5-u-pt-md", ref: resultRowRef },
@@ -1 +1 @@
1
- {"version":3,"file":"TopContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Suggestions/TopContent.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2DAA2D,CAAC;AAIxF,OAAO,KAAmB,MAAM,OAAO,CAAC;AASxC,UAAU,MAAM;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,MAAM,qBA8I/C"}
1
+ {"version":3,"file":"TopContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Suggestions/TopContent.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2DAA2D,CAAC;AAKxF,OAAO,KAAmB,MAAM,OAAO,CAAC;AASxC,UAAU,MAAM;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,MAAM,qBAiJ/C"}
@@ -1,5 +1,6 @@
1
1
  import { pcm } from '@cee-eng/hydrajs';
2
2
  import { Accordion, AccordionContent, AccordionItem, AccordionToggle, Tooltip } from '@patternfly/react-core';
3
+ import { dtmTrackEvent } from '@rh-support/utils';
3
4
  import isEqual from 'lodash/isEqual';
4
5
  import map from 'lodash/map';
5
6
  import React, { useState } from 'react';
@@ -13,7 +14,7 @@ export default function TopContent(props) {
13
14
  const sessionRestoreDispatch = React.useContext(SessionRestoreDispatchContext);
14
15
  const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = React.useContext(SessionRestoreStateContext);
15
16
  const [expanded, setExpanded] = useState('');
16
- const { product, version, summary, issue, environment, periodicityOfIssue, timeFramesAndUrgency } = useCaseSelector((state) => ({
17
+ const { product, version, summary, issue, environment, periodicityOfIssue, timeFramesAndUrgency, caseNumber } = useCaseSelector((state) => ({
17
18
  product: state.caseDetails.product,
18
19
  version: state.caseDetails.version,
19
20
  summary: state.caseDetails.summary,
@@ -21,9 +22,11 @@ export default function TopContent(props) {
21
22
  environment: state.caseDetails.environment,
22
23
  periodicityOfIssue: state.caseDetails.periodicityOfIssue,
23
24
  timeFramesAndUrgency: state.caseDetails.timeFramesAndUrgency,
25
+ caseNumber: state.caseDetails.caseNumber,
24
26
  }), isEqual);
25
27
  const onLinkClick = (item) => (event) => {
26
28
  props.onResourceClick && props.onResourceClick(item);
29
+ dtmTrackEvent('top content click', caseNumber, product);
27
30
  };
28
31
  const onToggle = (id) => {
29
32
  if (id === expanded) {
@@ -1 +1 @@
1
- {"version":3,"file":"UpdateSeverityModal.d.ts","sourceRoot":"","sources":["../../../../src/components/UpdateSeverityModal/UpdateSeverityModal.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAoB3E,UAAU,MAAM;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAigBxD"}
1
+ {"version":3,"file":"UpdateSeverityModal.d.ts","sourceRoot":"","sources":["../../../../src/components/UpdateSeverityModal/UpdateSeverityModal.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAoB3E,UAAU,MAAM;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAqiBxD"}
@@ -40,6 +40,7 @@ export default function UpdateSeverityModal(props) {
40
40
  const [isUpdateClickedToShowError, setIsUpdateClickedToShowError] = useState(false);
41
41
  const [isSeverityInValid, setIsSeverityInValid] = useState(false);
42
42
  const [seviritiesOptions, setSeveritiesOptions] = useState([]);
43
+ const [contactSameAsOwner, setContactSameAsOwner] = useState(false);
43
44
  const { request: postCommentRequest, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
44
45
  propgateErrors: true,
45
46
  });
@@ -58,13 +59,15 @@ export default function UpdateSeverityModal(props) {
58
59
  fts: state.caseDetails.fts,
59
60
  contactInfo24x7: state.caseDetails.contactInfo24x7,
60
61
  caseType: state.caseDetails.caseType,
62
+ phoneCountryCode: state.caseDetails.phoneCountryCode,
63
+ phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber || '',
61
64
  },
62
65
  isCaseUpdating: state.isCaseUpdating,
63
66
  versionsDetails: state.versionsDetails,
64
67
  ownersEntitlements: state.ownersEntitlements,
65
68
  }), isEqual);
66
69
  const { caseDetails, isCaseUpdating, ownersEntitlements, versionsDetails } = caseState;
67
- const { entitlementSla, fts, contactInfo24x7, caseType } = caseDetails;
70
+ const { entitlementSla, fts, contactInfo24x7, caseType, phoneAreaCodePrefixLineNumber, phoneCountryCode } = caseDetails;
68
71
  const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
69
72
  const [currentSeverity, setCurrentSeverity] = useState(caseDetails.caseSeverity);
70
73
  const [localFtsContact, setLocalFtsContact] = useState(contactInfo24x7 || '');
@@ -266,6 +269,17 @@ export default function UpdateSeverityModal(props) {
266
269
  setLocalFts(e.target.checked);
267
270
  setUpdatedCaseDetails((pre) => (Object.assign(Object.assign({}, pre), { fts: e.target.checked })));
268
271
  };
272
+ const onSetContactSameAsOwner = (e) => {
273
+ if (canEditCase.alert())
274
+ return;
275
+ if (!e.target.checked) {
276
+ setContactSameAsOwner(false);
277
+ return;
278
+ }
279
+ setUpdatedCaseDetails((pre) => (Object.assign(Object.assign({}, pre), { contactInfo24x7: `${phoneCountryCode}-${phoneAreaCodePrefixLineNumber}` })));
280
+ setLocalFtsContact(`${phoneCountryCode}-${phoneAreaCodePrefixLineNumber}`);
281
+ setContactSameAsOwner(true);
282
+ };
269
283
  const onFtsContactChange = (e) => {
270
284
  if (canEditCase.alert())
271
285
  return;
@@ -378,7 +392,11 @@ export default function UpdateSeverityModal(props) {
378
392
  localFts && (React.createElement("div", null,
379
393
  React.createElement("label", { htmlFor: "update-severity-24-7-contact", className: "pf-v5-u-mt-xs" },
380
394
  React.createElement(Trans, null, "Contact for 24x7 support")),
381
- React.createElement(TextArea, { isDisabled: !localFts, value: localFtsContact, onChange: onFtsContactChange, resizeOrientation: "vertical", "aria-label": "update-severity-24-7-contact", id: "update-severity-24-7-contact", rows: 1 }),
395
+ React.createElement("div", null,
396
+ React.createElement("input", { type: "checkbox", id: "update-severity-same-as-case-owner-phone", name: "update-severity-same-as-case-owner-phone", "data-tracking-id": "update-severity-same-as-case-owner-phone", checked: contactSameAsOwner, onChange: onSetContactSameAsOwner }),
397
+ React.createElement("label", { htmlFor: "update-severity-same-as-case-owner-phone", className: "pf-v5-u-font-weight-normal pf-v5-u-font-size-md" },
398
+ React.createElement(Trans, null, "Same as case owner's phone number"))),
399
+ React.createElement(TextArea, { isDisabled: !localFts || contactSameAsOwner, value: localFtsContact, onChange: onFtsContactChange, resizeOrientation: "vertical", "aria-label": "update-severity-24-7-contact", id: "update-severity-24-7-contact", "data-tracking-id": "update-severity-24-7-contact", rows: 2, placeholder: t('Enter 24x7 contact details') }),
382
400
  React.createElement("p", { className: "pf-v5-u-mt-xs" },
383
401
  React.createElement(Trans, null, "Please provide contact information where we can reach you at any time"))))))))));
384
402
  };
@@ -1 +1 @@
1
- {"version":3,"file":"WizardLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardLayout.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAavG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,qBAiKzC"}
1
+ {"version":3,"file":"WizardLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardLayout.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAavG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,qBAqKzC"}
@@ -11,7 +11,7 @@ import { Grid, GridItem } from '@patternfly/react-core';
11
11
  import { SupportFeedbackForm } from '@rh-support/components';
12
12
  import { fetchProducts, GlobalMetadataDispatchContext, GlobalMetadataStateContext } from '@rh-support/react-context';
13
13
  import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
14
- import { getVersionIfOnlyVersion, pendoTrackEvent, PreviousCaseTypes } from '@rh-support/utils';
14
+ import { dtmTrackEvent, getVersionIfOnlyVersion, pendoTrackEvent, PreviousCaseTypes } from '@rh-support/utils';
15
15
  import findIndex from 'lodash/findIndex';
16
16
  import isEqual from 'lodash/isEqual';
17
17
  import React, { useContext, useEffect, useRef, useState } from 'react';
@@ -32,12 +32,13 @@ import WizardAside from './WizardAside';
32
32
  import WizardMain from './WizardMain';
33
33
  export function WizardLayout(props) {
34
34
  const { routeState: { activeSection, isCaseCreate }, } = useContext(RouteContext);
35
- const { caseCreationError, contactSSOName, caseType, product, caseState } = useCaseSelector((state) => ({
35
+ const { caseCreationError, contactSSOName, caseType, product, caseState, caseNumber } = useCaseSelector((state) => ({
36
36
  caseState: state,
37
37
  caseCreationError: state.caseCreationError,
38
38
  contactSSOName: state.caseDetails.contactSSOName,
39
39
  caseType: state.caseDetails.caseType,
40
40
  product: state.caseDetails.product,
41
+ caseNumber: state.caseDetails.caseNumber,
41
42
  }), isEqual);
42
43
  const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
43
44
  const caseDispatch = useCaseDispatch();
@@ -92,6 +93,7 @@ export function WizardLayout(props) {
92
93
  React.createElement(SupportFeedbackForm, { isInline: true }),
93
94
  " if you continue to see this message.")));
94
95
  submitCase(caseDispatch, sessionRestoreDispatch, caseState, sessionItem, isCaseCreate, errorMessageCaseSubmit500, loggedInUser.data.ssoUsername, loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data.secureSupport, isReSubmitting || false);
96
+ dtmTrackEvent('submit', caseNumber, product);
95
97
  // reset viewedModals on case submit
96
98
  viewedConfirmationModalsList.current = [];
97
99
  !isReSubmitting &&
@@ -36,10 +36,10 @@ export declare const deleteNotifiedUsers: (dispatch: CaseReducerDispatchType, ca
36
36
  export declare const addingNotifiedUsers: (dispatch: CaseReducerDispatchType, caseNumber: string, addedUsers: IContact[]) => Promise<void>;
37
37
  export declare const clearSelectedAccount: (dispatch: CaseReducerDispatchType) => void;
38
38
  export declare const setCaseAccountNumber: (dispatch: CaseReducerDispatchType, accountNumber: string, isLoggedInUsersAccount?: boolean, loggedInUserAccount?: Partial<IAccount>) => Promise<void>;
39
- export declare const setCaseOwner: (dispatch: CaseReducerDispatchType, owner: IContact, product: string, abortSignalCaseGroup?: AbortSignal, abortSignalEntitlements?: AbortSignal, canUpdateCaseGroup?: boolean, caseGroupNumberToRestore?: string | undefined) => Promise<void>;
40
- export declare const fetchCaseGroupsForSSO: (dispatch: CaseReducerDispatchType, contactSsoUsername: string, canUpdateCaseGroup?: boolean, abortSignal?: AbortSignal, caseGroupNumberToRestore?: string | undefined) => Promise<void>;
39
+ export declare const setCaseOwner: (dispatch: CaseReducerDispatchType, owner: IContact, product: string, abortSignalCaseGroup?: AbortSignal, abortSignalEntitlements?: AbortSignal, setCaseGroupToUngroupedOrDefault?: boolean, caseGroupNumberToRestore?: string | undefined, canChangeGroup?: boolean) => Promise<void>;
40
+ export declare const fetchCaseGroupsForSSO: (dispatch: CaseReducerDispatchType, contactSsoUsername: string, setCaseGroupToUngroupedOrDefault?: boolean, abortSignal?: AbortSignal, caseGroupNumberToRestore?: string | undefined) => Promise<void>;
41
41
  export declare const updateCaseWithSession: (dispatch: CaseReducerDispatchType, sessionItem: ISessionItem, loggedInUserAccountNumber: string, loggedInUserContact: IContact, loggedInUserAccount?: Partial<IAccount>) => Promise<void>;
42
- export declare const fetchCaseDetails: (dispatch: CaseReducerDispatchType, caseNumber: string, loggedInUserRights: any, refresh?: boolean, previousState?: Partial<ICasePayload>) => Promise<void>;
42
+ export declare const fetchCaseDetails: (dispatch: CaseReducerDispatchType, caseNumber: string, loggedInUserRights: any, loggedInUser: any) => Promise<void>;
43
43
  export declare const updateCaseDetails: (dispatch: CaseReducerDispatchType, caseNumber: string, caseDetails: Partial<ICasePayload>, dontSetDetails?: boolean) => Promise<never>;
44
44
  export declare const getNotificationContacts4InternalUser: (dispatch: CaseReducerDispatchType, users: INotifiedUser[], caseOwnerSSO: string) => Promise<void>;
45
45
  export declare const getNotificationContacts4ExternalUser: (dispatch: CaseReducerDispatchType, users: any, loggedInUserRights: any, accountNumber: any, caseOwnerSSO: string, fullNameCustom: string) => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"CaseReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseReducer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAEtH,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAA+B,MAAM,qCAAqC,CAAC;AAC9G,OAAO,EAAE,QAAQ,EAAE,MAA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C,uBAAuB,cACrB,OAAO,iBACJ,MAAM,SAMxB,CAAC;AAIF,eAAO,MAAM,yBAAyB,aACxB,uBAAuB,iBAClB,MAAM,eACR,MAAM,sBACC,QAAQ,kBA6B/B,CAAC;AAEF,wBAAsB,2BAA2B,CAAC,QAAQ,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,iBAmBtG;AAGD,wBAAgB,oBAAoB,CAChC,QAAQ,EAAE,uBAAuB,EACjC,KAAK,EAAE,MAAM,EACb,gBAAgB,EAAE,mBAAmB,CAAC,OAAO,CAAC,0BAA0B,EAAE,CAAC,CAAC,EAC5E,QAAQ,EAAE,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"}
@@ -414,7 +414,7 @@ export const setCaseAccountNumber = (dispatch, accountNumber, isLoggedInUsersAcc
414
414
  });
415
415
  }
416
416
  });
417
- export const setCaseOwner = (dispatch, owner, product, abortSignalCaseGroup, abortSignalEntitlements, canUpdateCaseGroup = false, caseGroupNumberToRestore) => __awaiter(void 0, void 0, void 0, function* () {
417
+ export const setCaseOwner = (dispatch, owner, product, abortSignalCaseGroup, abortSignalEntitlements, setCaseGroupToUngroupedOrDefault = false, caseGroupNumberToRestore, canChangeGroup = true) => __awaiter(void 0, void 0, void 0, function* () {
418
418
  if (isEmpty(owner) || isEmpty(owner.ssoUsername)) {
419
419
  dispatch({
420
420
  type: CaseReducerConstants.caseDetailChanged,
@@ -427,7 +427,7 @@ export const setCaseOwner = (dispatch, owner, product, abortSignalCaseGroup, abo
427
427
  },
428
428
  },
429
429
  });
430
- canUpdateCaseGroup && setCaseDetails(dispatch, { groupNumber: '-1' });
430
+ setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber: '-1' });
431
431
  dispatch({
432
432
  type: CaseReducerConstants.caseStateChanged,
433
433
  payload: {
@@ -446,7 +446,8 @@ export const setCaseOwner = (dispatch, owner, product, abortSignalCaseGroup, abo
446
446
  type: CaseReducerConstants.caseDetailChanged,
447
447
  payload: { caseDetails: { contactSSOName: owner.ssoUsername } },
448
448
  });
449
- fetchCaseGroupsForSSO(dispatch, owner.ssoUsername, canUpdateCaseGroup, abortSignalCaseGroup, caseGroupNumberToRestore);
449
+ canChangeGroup &&
450
+ fetchCaseGroupsForSSO(dispatch, owner.ssoUsername, setCaseGroupToUngroupedOrDefault, abortSignalCaseGroup, caseGroupNumberToRestore);
450
451
  fetchCaseEntitlements(dispatch, owner.ssoUsername, product, abortSignalEntitlements);
451
452
  });
452
453
  const fetchCaseEntitlements = (dispatch, ssoUserName, product, abortSignal) => __awaiter(void 0, void 0, void 0, function* () {
@@ -470,7 +471,7 @@ const fetchCaseEntitlements = (dispatch, ssoUserName, product, abortSignal) => _
470
471
  });
471
472
  }
472
473
  });
473
- export const fetchCaseGroupsForSSO = (dispatch, contactSsoUsername, canUpdateCaseGroup = false, abortSignal, caseGroupNumberToRestore) => __awaiter(void 0, void 0, void 0, function* () {
474
+ export const fetchCaseGroupsForSSO = (dispatch, contactSsoUsername, setCaseGroupToUngroupedOrDefault = false, abortSignal, caseGroupNumberToRestore) => __awaiter(void 0, void 0, void 0, function* () {
474
475
  var _c, _d;
475
476
  dispatch({
476
477
  type: CaseReducerConstants.caseStateChanged,
@@ -486,14 +487,14 @@ export const fetchCaseGroupsForSSO = (dispatch, contactSsoUsername, canUpdateCas
486
487
  type: CaseReducerConstants.caseStateChanged,
487
488
  payload: { ownersCaseGroups: getApiResourceObject(response, false) },
488
489
  });
489
- canUpdateCaseGroup && setCaseDetails(dispatch, { groupNumber: defaultCaseGroup });
490
+ setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber: defaultCaseGroup });
490
491
  }
491
492
  catch (e) {
492
493
  dispatch({
493
494
  type: CaseReducerConstants.caseStateChanged,
494
495
  payload: { ownersCaseGroups: getApiResourceObject([], false, true, e.message) },
495
496
  });
496
- canUpdateCaseGroup && setCaseDetails(dispatch, { groupNumber: '-1' });
497
+ setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber: '-1' });
497
498
  }
498
499
  });
499
500
  const getSelectedNotificationContactsFromSession = (contacts, notifiedUsers) => {
@@ -564,7 +565,7 @@ const getAllRelevantContacts = (loggedInUserContact, caseAccountNumber, contactS
564
565
  return uniqBy(contactsToReturn, 'ssoUsername');
565
566
  }
566
567
  });
567
- export const fetchCaseDetails = (dispatch, caseNumber, loggedInUserRights, refresh = false, previousState = {}) => __awaiter(void 0, void 0, void 0, function* () {
568
+ export const fetchCaseDetails = (dispatch, caseNumber, loggedInUserRights, loggedInUser) => __awaiter(void 0, void 0, void 0, function* () {
568
569
  var _j, _k;
569
570
  dispatch({ type: CaseReducerConstants.requestCaseDetails, payload: { caseDetails: { caseNumber } } });
570
571
  try {
@@ -608,6 +609,8 @@ export const fetchCaseDetails = (dispatch, caseNumber, loggedInUserRights, refre
608
609
  noClusterIdReason: data.noClusterIdReason || '',
609
610
  noClusterIdReasonExplanation: data.noClusterIdReasonExplanation || '',
610
611
  phone: data.phone || '',
612
+ phoneCountryCode: data.phoneCountryCode || '',
613
+ phoneAreaCodePrefixLineNumber: data.phoneAreaCodePrefixLineNumber || '',
611
614
  suppliedPhoneNumberVerified: data.suppliedPhoneNumberVerified || undefined,
612
615
  screenSessionRequested: (_k = data.screenSessionRequested) !== null && _k !== void 0 ? _k : false,
613
616
  externalTrackers: data.externalTrackers || [],
@@ -629,30 +632,28 @@ export const fetchCaseDetails = (dispatch, caseNumber, loggedInUserRights, refre
629
632
  hotfixDelivered: !!data.hotfixDelivered,
630
633
  };
631
634
  dispatch({ type: CaseReducerConstants.receivedCaseDetails, payload: Object.assign(Object.assign({}, caseState), { caseDetails }) });
632
- if (!refresh) {
633
- setCaseAccountNumber(dispatch, data.accountNumberRef);
634
- setCaseOwner(dispatch, { ssoUsername: data.contactSSOName, fullNameCustom: data.contactName }, '');
635
- const notifiedListUsers = map(data.notifiedUsers, (o) => ({
636
- ssoUsername: o.ssoUsername,
637
- fullNameCustom: o.title,
638
- }));
639
- dispatch({
640
- type: CaseReducerConstants.setLoadedNotificationContacts,
641
- payload: { notifiedUsers: notifiedListUsers },
642
- });
643
- if (data.groupNumber && data.groupNumber !== '-1') {
644
- setSelectedCaseGroupUsers(dispatch, data.accountNumberRef, data.groupNumber, loggedInUserRights);
645
- }
646
- if (loggedInUserRights.isInternal() && !loggedInUserRights.isSecureSupportTech()) {
647
- getNotificationContacts4InternalUser(dispatch, notifiedListUsers, data.contactSSOName);
648
- }
649
- else {
650
- getNotificationContacts4ExternalUser(dispatch, notifiedListUsers, loggedInUserRights, data.accountNumberRef, data.contactSSOName, data.contactName);
651
- }
635
+ setCaseAccountNumber(dispatch, data.accountNumberRef);
636
+ const canChangeGroup = loggedInUserRights.isInternal() ||
637
+ loggedInUser.isOrgAdmin ||
638
+ loggedInUser.ssoUsername === caseDetails.contactSSOName ||
639
+ loggedInUserRights.data.isPartner();
640
+ setCaseOwner(dispatch, { ssoUsername: data.contactSSOName, fullNameCustom: data.contactName }, '', undefined, undefined, false, undefined, canChangeGroup);
641
+ const notifiedListUsers = map(data.notifiedUsers, (o) => ({
642
+ ssoUsername: o.ssoUsername,
643
+ fullNameCustom: o.title,
644
+ }));
645
+ dispatch({
646
+ type: CaseReducerConstants.setLoadedNotificationContacts,
647
+ payload: { notifiedUsers: notifiedListUsers },
648
+ });
649
+ if (data.groupNumber && data.groupNumber !== '-1') {
650
+ setSelectedCaseGroupUsers(dispatch, data.accountNumberRef, data.groupNumber, loggedInUserRights);
651
+ }
652
+ if (loggedInUserRights.isInternal() && !loggedInUserRights.isSecureSupportTech()) {
653
+ getNotificationContacts4InternalUser(dispatch, notifiedListUsers, data.contactSSOName);
652
654
  }
653
655
  else {
654
- previousState.contactSSOName !== data.contactSSOName &&
655
- setCaseOwner(dispatch, { ssoUsername: data.contactSSOName, fullNameCustom: data.contactSSOName }, '');
656
+ getNotificationContacts4ExternalUser(dispatch, notifiedListUsers, loggedInUserRights, data.accountNumberRef, data.contactSSOName, data.contactName);
656
657
  }
657
658
  }
658
659
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.2.132",
3
+ "version": "2.2.134",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -60,11 +60,11 @@
60
60
  "@progress/kendo-licensing": "1.3.5",
61
61
  "@progress/kendo-react-pdf": "^5.16.0",
62
62
  "@redux-devtools/extension": "^3.3.0",
63
- "@rh-support/components": "2.1.64",
64
- "@rh-support/react-context": "2.1.72",
63
+ "@rh-support/components": "2.1.66",
64
+ "@rh-support/react-context": "2.1.74",
65
65
  "@rh-support/types": "2.0.4",
66
- "@rh-support/user-permissions": "2.1.46",
67
- "@rh-support/utils": "2.1.35",
66
+ "@rh-support/user-permissions": "2.1.47",
67
+ "@rh-support/utils": "2.1.36",
68
68
  "@types/react-redux": "^7.1.33",
69
69
  "@types/redux": "^3.6.0",
70
70
  "dompurify": "^2.2.6",
@@ -131,5 +131,5 @@
131
131
  "defaults and supports es6-module",
132
132
  "maintained node versions"
133
133
  ],
134
- "gitHead": "ebd66de0a7cb1d33da81051cd7a554540806a510"
134
+ "gitHead": "fc8601c40a613c50ddac01f11fc79c9f26544aa5"
135
135
  }