@rh-support/troubleshoot 2.5.33 → 2.5.34

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ActiveCustomerEscalation.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,wBAAwB,+EA4HnC,CAAC"}
1
+ {"version":3,"file":"ActiveCustomerEscalation.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAO/D,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,wBAAwB,+EAqInC,CAAC"}
@@ -2,18 +2,24 @@ import { Button, ButtonVariant, List, ListItem, Popover } from '@patternfly/reac
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';
5
+ import isEqual from 'lodash/isEqual';
5
6
  import React, { forwardRef, useState } from 'react';
6
7
  import { Trans, useTranslation } from 'react-i18next';
8
+ import { useCaseSelector } from '../../../context/CaseContext';
7
9
  import { useCaseDetailsPageStateContext } from '../../../context/CaseDetailsPageContext';
8
10
  import { RequestEscalationModal } from './RequestEscalationModal';
9
11
  export const ActiveCustomerEscalation = forwardRef((props, ref) => {
10
12
  const { t } = useTranslation();
11
13
  const { caseDetailsPageState: { caseEscalations }, } = useCaseDetailsPageStateContext();
14
+ const { customerEscalation } = useCaseSelector((state) => ({
15
+ customerEscalation: state.customerEscalation,
16
+ }), isEqual);
12
17
  const canEditCase = useCanEditCase();
13
18
  const isCreateRMEVisible = (caseEscalations.data || []).length === 0 || caseEscalations.data.every((item) => item.status === 'Closed');
14
19
  const commonElements = (React.createElement(React.Fragment, null,
15
20
  React.createElement("p", null,
16
21
  React.createElement(Trans, null, "After submitting, your case will be reviewed by a support manager."))));
22
+ const onAceBtnClick = () => window.open(`/watchlist/internal/aces/new?caseNumber=${props.caseNumber}`, '_blank', 'noopener noreferrer');
17
23
  const isInternalElements = (React.createElement("div", { className: "card card-white card-support escalations", ref: ref },
18
24
  React.createElement("h3", { className: "card-heading case-detail-panel-card-heading card-header-bg" },
19
25
  React.createElement(Trans, null, "Active Customer Escalation (ACE)"),
@@ -28,7 +34,7 @@ export const ActiveCustomerEscalation = forwardRef((props, ref) => {
28
34
  React.createElement(ListItem, null, t('The customer thinks the case is not moving appropriately')),
29
35
  React.createElement(ListItem, null, t('The customer wants a new resource')),
30
36
  React.createElement(ListItem, null, t('The issue is more severe than originally thought'))),
31
- React.createElement("a", { href: `/watchlist/internal/aces/new?caseNumber=${props.caseNumber}`, className: "pf-v5-c-button pf-m-tertiary", target: "_blank", rel: "noopener noreferrer", "data-tracking-id": "request-ace-trigger", "aria-label": t('Request an escalation') }, t('Request an escalation')))));
37
+ React.createElement(Button, { className: "pf-v5-c-button pf-m-tertiary", onClick: onAceBtnClick, "data-tracking-id": "request-ace-trigger", "aria-label": t('Request an escalation'), isDisabled: customerEscalation }, t('Request an escalation')))));
32
38
  const [openRequestEscalationModal, setOpenRequestEscalationModal] = useState(false);
33
39
  const toggleModal = () => {
34
40
  if (canEditCase.alert())
@@ -1 +1 @@
1
- {"version":3,"file":"WizardMain.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardMain.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAS,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAK9D,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAQpF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,qBAAqB,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;IACzD,mBAAmB,EAAE,CAAC,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5E;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,qBAsIhC;AACD,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"WizardMain.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardMain.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAS,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAO9D,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAQpF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,qBAAqB,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;IACzD,mBAAmB,EAAE,CAAC,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5E;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,qBAgJhC;AACD,eAAe,UAAU,CAAC"}
@@ -5,8 +5,10 @@ import React, { Suspense, useContext, useRef, useState } from 'react';
5
5
  import { useTranslation } from 'react-i18next';
6
6
  import { Route } from 'react-router-dom';
7
7
  import { useCaseSelector } from '../../context/CaseContext';
8
+ import { RecommendationDispatchContext } from '../../context/RecommendationContext';
8
9
  import { RouteDispatchContext } from '../../context/RouteContext';
9
10
  import { useWizard } from '../../hooks/useWizard';
11
+ import { RecommendationsConstants } from '../../reducers/RecommendationsReducer';
10
12
  import { AppRouteSections } from '../../reducers/RouteConstNTypes';
11
13
  import { setActiveSectionChanged, updateisNextBtnClickedToShowValidationError } from '../../reducers/RouteReducer';
12
14
  import RouteUtils from '../../utils/routeUtils';
@@ -16,6 +18,7 @@ import NewFeatureModal from './NewFeatureModal';
16
18
  import WizardNavigation from './WizardNavigation';
17
19
  function WizardMain(props) {
18
20
  const [showRestFlag, setShowRestFlag] = useState(false);
21
+ const recommendationDispatch = useContext(RecommendationDispatchContext);
19
22
  const { isCreatingCase } = useCaseSelector((state) => ({
20
23
  isCreatingCase: state.isCreatingCase,
21
24
  }), isEqual);
@@ -48,6 +51,15 @@ function WizardMain(props) {
48
51
  RouteUtils.navigateToSection(props.routeProps, `${props.routeProps.location.pathname}/${step.id}`, false);
49
52
  };
50
53
  const onBack = (step, prevStep) => {
54
+ // isLoadingRecommendations needs to be set to false on back when the previous step is the summary
55
+ // step because it can cause the next button to be permanently disabled if the debounce is not called
56
+ // before going back a step. This can be caused if navigating quickly to then away from the recommendations page.
57
+ if (prevStep.prevId === AppRouteSections.SUMMARIZE) {
58
+ recommendationDispatch({
59
+ type: RecommendationsConstants.setIsLoadingRecommendations,
60
+ payload: { isLoadingRecommendations: false },
61
+ });
62
+ }
51
63
  var regex = new RegExp('/' + prevStep.prevId + '$');
52
64
  RouteUtils.navigateToSection(props.routeProps, props.routeProps.location.pathname.replace(regex, ''), false);
53
65
  };
@@ -308,6 +308,7 @@ input[aria-invalid='true'].pf-v5-c-form-control {
308
308
  .comment-body ul,
309
309
  .markdown-preview ul {
310
310
  list-style: '- ';
311
+ padding-left: 1.5em;
311
312
  }
312
313
 
313
314
  /* Improves the sidebar loading */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.5.33",
3
+ "version": "2.5.34",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -134,5 +134,5 @@
134
134
  "defaults and supports es6-module",
135
135
  "maintained node versions"
136
136
  ],
137
- "gitHead": "25dc755c973c1fd3169c76df597839acb07dde64"
137
+ "gitHead": "5c26ff9b5fef375e60deb551908ab4556e2ac831"
138
138
  }