@rh-support/troubleshoot 2.6.18 → 2.6.20

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 (69) hide show
  1. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts +1 -0
  2. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
  3. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +31 -5
  4. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
  5. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +33 -34
  6. package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
  7. package/lib/esm/components/CaseEditView/CaseDetailsAside.js +2 -1
  8. package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
  9. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +1 -0
  10. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
  11. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +16 -22
  12. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
  13. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +15 -19
  14. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +1 -1
  15. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +0 -8
  16. package/lib/esm/components/CaseManagement/RHAssociatesSelector.d.ts.map +1 -1
  17. package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +5 -8
  18. package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.d.ts.map +1 -1
  19. package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +7 -7
  20. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
  21. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +1 -1
  22. package/lib/esm/components/TroubleshootSection/AskRedHat.d.ts +7 -0
  23. package/lib/esm/components/TroubleshootSection/AskRedHat.d.ts.map +1 -0
  24. package/lib/esm/components/TroubleshootSection/AskRedHat.js +73 -0
  25. package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts +5 -0
  26. package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts.map +1 -1
  27. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +82 -12
  28. package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.d.ts +9 -0
  29. package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.d.ts.map +1 -0
  30. package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.js +9 -0
  31. package/lib/esm/components/TroubleshootSection/icons/StarIcon.d.ts +9 -0
  32. package/lib/esm/components/TroubleshootSection/icons/StarIcon.d.ts.map +1 -0
  33. package/lib/esm/components/TroubleshootSection/icons/StarIcon.js +17 -0
  34. package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts +0 -1
  35. package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts.map +1 -1
  36. package/lib/esm/components/shared/input/ContactSelectorInternal.js +1 -6
  37. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  38. package/lib/esm/components/wizardLayout/WizardLayout.js +5 -4
  39. package/lib/esm/components/wizardLayout/WizardMain.d.ts +3 -1
  40. package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
  41. package/lib/esm/components/wizardLayout/WizardMain.js +115 -9
  42. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts +2 -0
  43. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  44. package/lib/esm/components/wizardLayout/WizardNavigation.js +11 -3
  45. package/lib/esm/components/wizardLayout/index.d.ts +1 -0
  46. package/lib/esm/components/wizardLayout/index.d.ts.map +1 -1
  47. package/lib/esm/components/wizardLayout/index.js +1 -0
  48. package/lib/esm/context/AIResponseContext.d.ts +10 -0
  49. package/lib/esm/context/AIResponseContext.d.ts.map +1 -0
  50. package/lib/esm/context/AIResponseContext.js +26 -0
  51. package/lib/esm/context/RootTroubleshootProvider.d.ts.map +1 -1
  52. package/lib/esm/context/RootTroubleshootProvider.js +8 -6
  53. package/lib/esm/css/AskRedHat.css +283 -0
  54. package/lib/esm/css/case.css +0 -12
  55. package/lib/esm/hooks/useWizard.d.ts +4 -0
  56. package/lib/esm/hooks/useWizard.d.ts.map +1 -1
  57. package/lib/esm/hooks/useWizard.js +1 -1
  58. package/lib/esm/reducers/AIResponseConstNTypes.d.ts +48 -0
  59. package/lib/esm/reducers/AIResponseConstNTypes.d.ts.map +1 -0
  60. package/lib/esm/reducers/AIResponseConstNTypes.js +16 -0
  61. package/lib/esm/reducers/AIResponseReducer.d.ts +9 -0
  62. package/lib/esm/reducers/AIResponseReducer.d.ts.map +1 -0
  63. package/lib/esm/reducers/AIResponseReducer.js +43 -0
  64. package/lib/esm/reducers/CaseConstNTypes.d.ts +2 -0
  65. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  66. package/lib/esm/reducers/CaseConstNTypes.js +2 -0
  67. package/lib/esm/scss/_main.scss +0 -13
  68. package/lib/esm/scss/_pf-overrides.scss +0 -5
  69. package/package.json +7 -6
@@ -3,6 +3,7 @@ interface IProps {
3
3
  caseNumber: string;
4
4
  caseSeverity: string;
5
5
  caseStatus: string;
6
+ canViewACESection: boolean;
6
7
  }
7
8
  export declare const ActiveCustomerEscalation: React.ForwardRefExoticComponent<IProps & React.RefAttributes<HTMLDivElement>>;
8
9
  export {};
@@ -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,+EAwInC,CAAC"}
1
+ {"version":3,"file":"ActiveCustomerEscalation.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;CAC9B;AAED,eAAO,MAAM,wBAAwB,+EAqLnC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { Button, ButtonVariant, Card, CardBody, CardHeader, List, ListItem, Popover } from '@patternfly/react-core';
2
2
  import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
3
- import { useCanEditCase } from '@rh-support/react-context';
3
+ import LockIcon from '@patternfly/react-icons/dist/js/icons/lock-icon';
4
+ import { useCanEditCase, useGlobalStateContext } from '@rh-support/react-context';
4
5
  import { Can, resourceActions, resources } from '@rh-support/user-permissions';
5
6
  import React, { forwardRef, useState } from 'react';
6
7
  import { Trans, useTranslation } from 'react-i18next';
@@ -9,6 +10,9 @@ import { RequestEscalationModal } from './RequestEscalationModal';
9
10
  export const ActiveCustomerEscalation = forwardRef((props, ref) => {
10
11
  const { t } = useTranslation();
11
12
  const { caseDetailsPageState: { caseEscalations }, } = useCaseDetailsPageStateContext();
13
+ const { globalMetadataState: { loggedInUserRights }, } = useGlobalStateContext();
14
+ const isExternal = loggedInUserRights.data.isExternal();
15
+ const isInternal = loggedInUserRights.data.isInternal();
12
16
  const canEditCase = useCanEditCase();
13
17
  const isCreateRMEVisible = (caseEscalations.data || []).length === 0 || caseEscalations.data.every((item) => item.status === 'Closed');
14
18
  const commonElements = (React.createElement(React.Fragment, null,
@@ -22,7 +26,18 @@ export const ActiveCustomerEscalation = forwardRef((props, ref) => {
22
26
  React.createElement("a", { href: "/support/escalation", target: "_blank", rel: "noopener noreferrer", "aria-label": t('Learn more about Red Hat support case escalation') },
23
27
  React.createElement(InfoCircleIcon, null)))),
24
28
  React.createElement(CardBody, null,
25
- React.createElement(React.Fragment, null,
29
+ isInternal && (React.createElement(React.Fragment, null,
30
+ React.createElement("p", null,
31
+ React.createElement(LockIcon, null),
32
+ " ",
33
+ React.createElement("strong", null, `${t('Available to customers only')}`)),
34
+ React.createElement("p", null,
35
+ React.createElement(Trans, null,
36
+ "Available to customers only. When a customer submits an escalation request, it is routed to a support manager for review. Support agents can refer to the",
37
+ ' ',
38
+ React.createElement("a", { href: "https://access.redhat.com/support/escalation", target: "_blank", rel: "noreferrer" }, "Escalation guidelines"),
39
+ "for details.")))),
40
+ isExternal && props.canViewACESection && (React.createElement(React.Fragment, null,
26
41
  React.createElement("p", null,
27
42
  React.createElement("strong", null, t('Red Hat associates can open an ACE escalation when')),
28
43
  ":"),
@@ -31,7 +46,7 @@ export const ActiveCustomerEscalation = forwardRef((props, ref) => {
31
46
  React.createElement(ListItem, null, t('The customer thinks the case is not moving appropriately')),
32
47
  React.createElement(ListItem, null, t('The customer wants a new resource')),
33
48
  React.createElement(ListItem, null, t('The issue is more severe than originally thought'))),
34
- React.createElement("a", { href: `/watchlist/internal/aces/new?caseNumber=${props.caseNumber}`, target: "_blank", rel: "noopener noreferrer", className: "pf-v6-c-button pf-m-tertiary", "data-tracking-id": "request-ace-trigger", "aria-label": t('Request an escalation') }, t('Request an escalation'))))));
49
+ React.createElement("a", { href: `/watchlist/internal/aces/new?caseNumber=${props.caseNumber}`, target: "_blank", rel: "noopener noreferrer", className: "pf-v6-c-button pf-m-tertiary", "data-tracking-id": "request-ace-trigger", "aria-label": t('Request an escalation') }, t('Request an escalation')))))));
35
50
  const [openRequestEscalationModal, setOpenRequestEscalationModal] = useState(false);
36
51
  const toggleModal = () => {
37
52
  if (canEditCase.alert())
@@ -47,7 +62,18 @@ export const ActiveCustomerEscalation = forwardRef((props, ref) => {
47
62
  React.createElement(Trans, null, "Learn more about escalation cases."))) },
48
63
  React.createElement(InfoCircleIcon, { title: t('Learn more about escalation cases popover') }))))),
49
64
  React.createElement(CardBody, null,
50
- React.createElement(React.Fragment, null,
65
+ isInternal && (React.createElement(React.Fragment, null,
66
+ React.createElement("p", null,
67
+ React.createElement(LockIcon, null),
68
+ " ",
69
+ React.createElement("strong", null, `${t('Available to customers only')}`)),
70
+ React.createElement("p", null,
71
+ React.createElement(Trans, null,
72
+ "Available to customers only. When a customer submits an escalation request, it is routed to a support manager for review. Support agents can refer to the",
73
+ ' ',
74
+ React.createElement("a", { href: "https://access.redhat.com/support/escalation", target: "_blank", rel: "noreferrer" }, "Escalation guidelines"),
75
+ "for details.")))),
76
+ isExternal && (React.createElement(React.Fragment, null,
51
77
  React.createElement("p", null,
52
78
  React.createElement("strong", null, t('Request a management escalation if your issue')),
53
79
  ":"),
@@ -56,7 +82,7 @@ export const ActiveCustomerEscalation = forwardRef((props, ref) => {
56
82
  React.createElement(ListItem, null, t('Needs a senior resource.')),
57
83
  React.createElement(ListItem, null, t('Is more severe or should be a higher priority.'))),
58
84
  commonElements,
59
- React.createElement(Button, { variant: ButtonVariant.secondary, onClick: toggleModal, "data-tracking-id": "request-rme-trigger", "aria-label": t('Request an escalation') }, t('Request an escalation'))))));
85
+ React.createElement(Button, { variant: ButtonVariant.secondary, onClick: toggleModal, "data-tracking-id": "request-rme-trigger", "aria-label": t('Request an escalation') }, t('Request an escalation')))))));
60
86
  return (React.createElement(React.Fragment, null,
61
87
  React.createElement(RequestEscalationModal, { caseNumber: props.caseNumber, severity: props.caseSeverity, caseStatus: props.caseStatus, show: openRequestEscalationModal, onClose: toggleModal }),
62
88
  React.createElement(Can, { do: resourceActions.CREATE, on: resources.ICE_ESCALATION, passThrough: true }, (canCreateICE) => canCreateICE ? isInternalElements : isCreateRMEVisible ? isNotInternalElements : React.createElement(React.Fragment, null))));
@@ -1 +1 @@
1
- {"version":3,"file":"RequestEscalationModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.tsx"],"names":[],"mappings":"AAiCA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAkBnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAID,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,qBA6WnD"}
1
+ {"version":3,"file":"RequestEscalationModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.tsx"],"names":[],"mappings":"AAgCA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAkBnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAID,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,qBA2WnD"}
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { escalations, publicApi } from '@cee-eng/hydrajs';
11
- import { Button, Form, FormGroup, FormHelperText, Grid, GridItem, HelperText, HelperTextItem, Modal, ModalBody, ModalFooter, ModalHeader, Popover, TextArea, TextInput, Title, ValidatedOptions, } from '@patternfly/react-core';
11
+ import { Button, Form, FormGroup, FormHelperText, Grid, GridItem, HelperText, HelperTextItem, Modal, ModalFooter, ModalHeader, Popover, TextArea, TextInput, Title, ValidatedOptions, } from '@patternfly/react-core';
12
12
  import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
13
13
  import { AlertMessage, AlertType, LoadingIndicator, SingleSelectDropdown, ToastNotification, useFetch, } from '@rh-support/components';
14
14
  import { useGlobalStateContext } from '@rh-support/react-context';
@@ -157,39 +157,38 @@ export function RequestEscalationModal(props) {
157
157
  };
158
158
  return (React.createElement(Modal, { id: "request-mgmt-escalation-modal", className: "request-escalation-modal", isOpen: props.show, onClose: onCancel, "aria-label": t('Request an escalation') },
159
159
  React.createElement(ModalHeader, null, header),
160
- React.createElement(ModalBody, null,
161
- React.createElement("p", { className: "pf-v6-u-mb-md" },
162
- React.createElement(Trans, { i18nKey: "i18RequestEscalationDescription" }, "Submit an escalation if an issue has become more severe or you feel the case needs a higher priority. A support manager will review your escalation request.")),
163
- React.createElement(AlertMessage, { variant: AlertType.DANGER, title: t('Could not create case escalation'), show: creationError, onClose: onErrorClose, isInline: true, className: "pf-v6-u-mb-md", "aria-label": t('Could not create case escalation') }),
164
- React.createElement(Form, { "aria-label": t('form'), className: "request-escalation-form" },
165
- React.createElement(Grid, { hasGutter: true, md: 12 },
166
- React.createElement(GridItem, { span: 6 },
167
- React.createElement(FormGroup, { isRequired: true, label: t('Category'), fieldId: "escalation-category" },
168
- React.createElement(SingleSelectDropdown, { id: "customer-category-select", ariaLabel: t('Category'), selected: selectedCategory, options: categoryOptions, isDisabled: false, isLoading: isCategoriesFetching, isInvalid: submitButtonIsClicked && isEmpty(formState.rmeCategory), placeholder: t('Select an option that best fits'), onSelect: (option) => setCategoryState(option), isScrollable: true }))),
169
- React.createElement(GridItem, { span: 6 },
170
- React.createElement(FormGroup, { isRequired: true, label: t('My region'), fieldId: "escalation-region" },
171
- React.createElement(SingleSelectDropdown, { ariaLabel: t('My region'), id: "customer-geo-select", selected: selectedGeo, options: geoOptions, isInvalid: submitButtonIsClicked && isEmpty(formState.geo), placeholder: t('Select a location'), onSelect: (option) => setGeoState(option) }))),
172
- React.createElement(FormGroup, { isRequired: true, label: t('Subject'), fieldId: "escalation-subject" },
173
- submitButtonIsClicked && hasLargeSubject && (React.createElement(FormHelperText, null,
174
- React.createElement(HelperText, null,
175
- React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('Subject cannot be more than {{limit}} characters', {
176
- limit: ESCALATION_SUBJECT_LENGTH_LIMIT,
177
- }))))),
178
- React.createElement(TextInput, { isRequired: true, validated: (submitButtonIsClicked && isEmpty(formState.subject)) || hasLargeSubject
179
- ? ValidatedOptions.error
180
- : ValidatedOptions.default, type: "text", placeholder: t('Enter a subject for your request'), id: "subject-input", name: "subject-input", value: formState.subject, onChange: (_event, subject) => onSubjectChange(subject), "aria-label": t('Subject') })),
181
- React.createElement(FormGroup, { isRequired: true, label: t('Description'), fieldId: "escalation-description" },
182
- React.createElement(TextArea, { value: formState.description, onChange: (e, value) => setFormStateValue('description', value), isRequired: true, validated: submitButtonIsClicked && isEmpty(formState.description)
183
- ? ValidatedOptions.error
184
- : ValidatedOptions.default, "aria-label": t('Description'), id: "description-textarea", placeholder: t('Provide a detailed comment for us to best assist you'), resizeOrientation: "vertical" })),
185
- React.createElement(FormGroup, { isRequired: true, label: t('Expectations'), fieldId: "escalation-expectations" },
186
- React.createElement(TextArea, { onChange: (e, value) => setFormStateValue('expectations', value), isRequired: true, validated: submitButtonIsClicked && isEmpty(formState.expectations)
187
- ? ValidatedOptions.error
188
- : ValidatedOptions.default, placeholder: t('What do you expect to happen with this escalation?'), id: "expectations-input", value: formState.expectations, "aria-label": t('Expectations'), resizeOrientation: "vertical" })),
189
- React.createElement(FormGroup, { isRequired: true, label: t('Business impact'), fieldId: "escalation-business-impact" },
190
- React.createElement(TextArea, { onChange: (e, value) => setFormStateValue('businessImpactDescription', value), isRequired: true, validated: submitButtonIsClicked && isEmpty(formState.businessImpactDescription)
191
- ? ValidatedOptions.error
192
- : ValidatedOptions.default, placeholder: t('Does your business impact change with this escalation? Please describe how it changed.'), id: "business-impact-input", value: formState.businessImpactDescription, "aria-label": t('Business impact'), resizeOrientation: "vertical" }))))),
160
+ React.createElement("p", { className: "pf-v6-u-mb-md" },
161
+ React.createElement(Trans, { i18nKey: "i18RequestEscalationDescription" }, "Submit an escalation if an issue has become more severe or you feel the case needs a higher priority. A support manager will review your escalation request.")),
162
+ React.createElement(AlertMessage, { variant: AlertType.DANGER, title: t('Could not create case escalation'), show: creationError, onClose: onErrorClose, isInline: true, className: "pf-v6-u-mb-md", "aria-label": t('Could not create case escalation') }),
163
+ React.createElement(Form, { "aria-label": t('form'), className: "request-escalation-form" },
164
+ React.createElement(Grid, { hasGutter: true, md: 12 },
165
+ React.createElement(GridItem, { span: 6 },
166
+ React.createElement(FormGroup, { isRequired: true, label: t('Category'), fieldId: "escalation-category" },
167
+ React.createElement(SingleSelectDropdown, { id: "customer-category-select", ariaLabel: t('Category'), selected: selectedCategory, options: categoryOptions, isDisabled: false, isLoading: isCategoriesFetching, isInvalid: submitButtonIsClicked && isEmpty(formState.rmeCategory), placeholder: t('Select an option that best fits'), onSelect: (option) => setCategoryState(option), isScrollable: true }))),
168
+ React.createElement(GridItem, { span: 6 },
169
+ React.createElement(FormGroup, { isRequired: true, label: t('My region'), fieldId: "escalation-region" },
170
+ React.createElement(SingleSelectDropdown, { ariaLabel: t('My region'), id: "customer-geo-select", selected: selectedGeo, options: geoOptions, isInvalid: submitButtonIsClicked && isEmpty(formState.geo), placeholder: t('Select a location'), onSelect: (option) => setGeoState(option) }))),
171
+ React.createElement(FormGroup, { isRequired: true, label: t('Subject'), fieldId: "escalation-subject" },
172
+ submitButtonIsClicked && hasLargeSubject && (React.createElement(FormHelperText, null,
173
+ React.createElement(HelperText, null,
174
+ React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('Subject cannot be more than {{limit}} characters', {
175
+ limit: ESCALATION_SUBJECT_LENGTH_LIMIT,
176
+ }))))),
177
+ React.createElement(TextInput, { isRequired: true, validated: (submitButtonIsClicked && isEmpty(formState.subject)) || hasLargeSubject
178
+ ? ValidatedOptions.error
179
+ : ValidatedOptions.default, type: "text", placeholder: t('Enter a subject for your request'), id: "subject-input", name: "subject-input", value: formState.subject, onChange: (_event, subject) => onSubjectChange(subject), "aria-label": t('Subject') })),
180
+ React.createElement(FormGroup, { isRequired: true, label: t('Description'), fieldId: "escalation-description" },
181
+ React.createElement(TextArea, { value: formState.description, onChange: (e, value) => setFormStateValue('description', value), isRequired: true, validated: submitButtonIsClicked && isEmpty(formState.description)
182
+ ? ValidatedOptions.error
183
+ : ValidatedOptions.default, "aria-label": t('Description'), id: "description-textarea", placeholder: t('Provide a detailed comment for us to best assist you'), resizeOrientation: "vertical" })),
184
+ React.createElement(FormGroup, { isRequired: true, label: t('Expectations'), fieldId: "escalation-expectations" },
185
+ React.createElement(TextArea, { onChange: (e, value) => setFormStateValue('expectations', value), isRequired: true, validated: submitButtonIsClicked && isEmpty(formState.expectations)
186
+ ? ValidatedOptions.error
187
+ : ValidatedOptions.default, placeholder: t('What do you expect to happen with this escalation?'), id: "expectations-input", value: formState.expectations, "aria-label": t('Expectations'), resizeOrientation: "vertical" })),
188
+ React.createElement(FormGroup, { isRequired: true, label: t('Business impact'), fieldId: "escalation-business-impact" },
189
+ React.createElement(TextArea, { onChange: (e, value) => setFormStateValue('businessImpactDescription', value), isRequired: true, validated: submitButtonIsClicked && isEmpty(formState.businessImpactDescription)
190
+ ? ValidatedOptions.error
191
+ : ValidatedOptions.default, placeholder: t('Does your business impact change with this escalation? Please describe how it changed.'), id: "business-impact-input", value: formState.businessImpactDescription, "aria-label": t('Business impact'), resizeOrientation: "vertical" })))),
193
192
  React.createElement(ModalFooter, null,
194
193
  React.createElement(Button, { key: "submit", variant: "primary", onClick: onSubmit, "data-tracking-id": "request-rme-submit", isDisabled: submitButtonIsClicked &&
195
194
  (isPostingComment || isUpdatingCase || createEscalationFetch.isFetching || !hasRequiredInfo()), "aria-label": t('Submit') },
@@ -1 +1 @@
1
- {"version":3,"file":"CaseDetailsAside.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsAside.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAYhF,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBA6Y7C"}
1
+ {"version":3,"file":"CaseDetailsAside.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsAside.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAYhF,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBA8Y7C"}
@@ -51,6 +51,7 @@ export function CaseDetailsAside(props) {
51
51
  const canCreateRME = ability.can(resourceActions.CREATE, resources.RME_ESCALATION);
52
52
  const canCreateICE = ability.can(resourceActions.CREATE, resources.ICE_ESCALATION);
53
53
  const canSeeToggleCustomerView = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_TOGGLE_CUSTOMER_VIEW);
54
+ const canViewACESection = canCreateICE || canCreateRME;
54
55
  const globalMetadataDispatchContext = useContext(GlobalMetadataDispatchContext);
55
56
  const caseDetailsAsidePanelRef = useRef(null);
56
57
  const forceUpdate = useForceUpdate();
@@ -232,5 +233,5 @@ export function CaseDetailsAside(props) {
232
233
  !isESSCustomer && (React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading remote session agreement section') } },
233
234
  React.createElement(RemoteSessionAgreement, { caseNumber: caseNumber, caseSeverity: severity, caseStatus: status, ref: createEscalationRef, waitingOnCallback: waitingOnCallback, acceptedRemoteSessionTerms: acceptedRemoteSessionTerms && waitingOnCallback, readOnly: canReadCase }))),
234
235
  !caseEscalations.isFetching && isWritePermissionforCase && (React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading customer escalation section') } },
235
- React.createElement(ActiveCustomerEscalation, { caseNumber: caseNumber, caseSeverity: severity, caseStatus: status, ref: createEscalationRef })))))));
236
+ React.createElement(ActiveCustomerEscalation, { canViewACESection: canViewACESection, caseNumber: caseNumber, caseSeverity: severity, caseStatus: status, ref: createEscalationRef })))))));
236
237
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CaseDetailsTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsTabs.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AA0BlE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,mBAAmB,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AACD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,qBAoS5C"}
1
+ {"version":3,"file":"CaseDetailsTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsTabs.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AA0BlE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,mBAAmB,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AACD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,qBAqS5C"}
@@ -135,6 +135,7 @@ export function CaseDetailsTabs(props) {
135
135
  component: React.createElement(CaseSummary, { caseNumber: caseNumber }),
136
136
  });
137
137
  const getActiveTabKey = () => {
138
+ console.warn(activeTab, activeTabKey);
138
139
  if (!activeTab)
139
140
  return activeTabKey;
140
141
  const tabIndex = tabsToRender.findIndex((item) => item.routePath === activeTab);
@@ -1 +1 @@
1
- {"version":3,"file":"ReopenCaseModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ConfirmationModals/ReopenCaseModal.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAEzE,UAAU,MAAM;IACZ,SAAS,EAAE,CAAC,WAAW,KAAA,EAAE,SAAS,KAAA,EAAE,UAAU,CAAC,KAAA,EAAE,iBAAiB,CAAC,KAAA,EAAE,cAAc,CAAC,KAAA,EAAE,mBAAmB,CAAC,KAAA,KAAK,IAAI,CAAC;IACpH,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,cAAc,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;CACzB;AAMD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,qBAkN5C"}
1
+ {"version":3,"file":"ReopenCaseModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ConfirmationModals/ReopenCaseModal.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAEzE,UAAU,MAAM;IACZ,SAAS,EAAE,CAAC,WAAW,KAAA,EAAE,SAAS,KAAA,EAAE,UAAU,CAAC,KAAA,EAAE,iBAAiB,CAAC,KAAA,EAAE,cAAc,CAAC,KAAA,EAAE,mBAAmB,CAAC,KAAA,KAAK,IAAI,CAAC;IACpH,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,cAAc,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;CACzB;AAMD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,qBA0M5C"}
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { Button, ButtonVariant, Form, FormGroup, FormHelperText, HelperText, HelperTextItem, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant, TextArea, } from '@patternfly/react-core';
10
+ import { Button, ButtonVariant, Form, FormGroup, FormHelperText, HelperText, HelperTextItem, Modal, ModalVariant, TextArea, } from '@patternfly/react-core';
11
11
  import { SingleSelectDropdown } from '@rh-support/components';
12
12
  import { formatDateTime } from '@rh-support/utils';
13
13
  import isEmpty from 'lodash/isEmpty';
@@ -82,27 +82,21 @@ export function ReopenCaseModal(props) {
82
82
  label: selectedStatus,
83
83
  value: selectedStatus,
84
84
  };
85
- return (React.createElement(Modal, { className: "case-reopen-modal", id: "case-reopen-modal", "aria-describedby": "case-reopen-modal", isOpen: true, onClose: props.onClose, variant: ModalVariant.medium },
86
- React.createElement(ModalHeader, null,
87
- React.createElement("h2", null, t(`Reopening case ${props.caseNumber}`))),
88
- React.createElement(ModalBody, null,
89
- React.createElement(Form, { className: "case-reopen-modal-form" },
90
- (!props.isInternal || !props.reopenStatus) && (React.createElement(FormGroup, { label: t(props.isInternal ? 'Status' : 'Reason'), isRequired: true, fieldId: "case-resolution" },
91
- showValidationError && (props.isInternal ? !selectedStatus : !selectedReason) && (React.createElement(FormHelperText, null,
92
- React.createElement(HelperText, null,
93
- React.createElement(HelperTextItem, { variant: "error" },
94
- React.createElement(Trans, null, "Required field"))))),
95
- props.isInternal ? (React.createElement(SingleSelectDropdown, { placeholder: t('Select an option that best fits'), dataTrackingId: "reopen-case-status", options: getStatusDropdownOptions, selected: getSelectedStatusOption, isDisabled: props.isUpdating, isInvalid: showValidationError && !selectedStatus, onSelect: onStatusChange })) : (React.createElement(SingleSelectDropdown, { placeholder: t('Select an option that best fits'), dataTrackingId: "case-resolution", options: getReasonDropdownOptions, selected: getSelectedReasonOption, isDisabled: props.isUpdating, isInvalid: showValidationError && !selectedReason, onSelect: onReasonChange })))),
96
- showTextArea && (React.createElement(FormGroup, { label: t('Please describe your reason'), type: "text", isRequired: true, fieldId: "reopen-case-description" },
97
- React.createElement(TextArea, { placeholder: t(props.isInternal
98
- ? 'Describe the reason for reopening with the selected status'
99
- : 'The better the description, the easier it will be for our support team to address your case.'), validated: showValidationError && isDescriptionEmpty && !reopenDescription
100
- ? 'error'
101
- : 'default', isRequired: true, id: "reopen-case-description", name: "reopen-case-description", "aria-describedby": "reopen-case-description", value: reopenDescription, onChange: (_event, text) => onDescriptionChange(text), isDisabled: props.isUpdating, resizeOrientation: "vertical" }),
102
- React.createElement(FormHelperText, null,
103
- React.createElement(HelperText, null,
104
- React.createElement(HelperTextItem, null, t(`Your comment will be visible${props.isInternal ? ' to the customers' : ''} under discussions after reopening.`)))))))),
105
- React.createElement(ModalFooter, null,
85
+ return (React.createElement(Modal, { className: "case-reopen-modal", id: "case-reopen-modal", title: t(`Reopening case ${props.caseNumber}`), "aria-describedby": "case-reopen-modal", isOpen: true, onClose: props.onClose, variant: ModalVariant.medium },
86
+ React.createElement(Form, { className: "case-reopen-modal-form" },
87
+ (!props.isInternal || !props.reopenStatus) && (React.createElement(FormGroup, { label: t(props.isInternal ? 'Status' : 'Reason'), isRequired: true, fieldId: "case-resolution" },
88
+ showValidationError && (props.isInternal ? !selectedStatus : !selectedReason) && (React.createElement(FormHelperText, null,
89
+ React.createElement(HelperText, null,
90
+ React.createElement(HelperTextItem, { variant: "error" },
91
+ React.createElement(Trans, null, "Required field"))))),
92
+ props.isInternal ? (React.createElement(SingleSelectDropdown, { placeholder: t('Select an option that best fits'), dataTrackingId: "reopen-case-status", options: getStatusDropdownOptions, selected: getSelectedStatusOption, isDisabled: props.isUpdating, isInvalid: showValidationError && !selectedStatus, onSelect: onStatusChange })) : (React.createElement(SingleSelectDropdown, { placeholder: t('Select an option that best fits'), dataTrackingId: "case-resolution", options: getReasonDropdownOptions, selected: getSelectedReasonOption, isDisabled: props.isUpdating, isInvalid: showValidationError && !selectedReason, onSelect: onReasonChange })))),
93
+ showTextArea && (React.createElement(FormGroup, { label: t('Please describe your reason'), type: "text", isRequired: true, fieldId: "reopen-case-description" },
94
+ React.createElement(TextArea, { placeholder: t(props.isInternal
95
+ ? 'Describe the reason for reopening with the selected status'
96
+ : 'The better the description, the easier it will be for our support team to address your case.'), validated: showValidationError && isDescriptionEmpty && !reopenDescription ? 'error' : 'default', isRequired: true, id: "reopen-case-description", name: "reopen-case-description", "aria-describedby": "reopen-case-description", value: reopenDescription, onChange: (_event, text) => onDescriptionChange(text), isDisabled: props.isUpdating, resizeOrientation: "vertical" }),
97
+ React.createElement(FormHelperText, null,
98
+ React.createElement(HelperText, null,
99
+ React.createElement(HelperTextItem, null, t(`Your comment will be visible${props.isInternal ? ' to the customers' : ''} under discussions after reopening.`)))))),
106
100
  React.createElement("div", { className: "pf-v6-u-pt-md" },
107
101
  React.createElement(Button, { key: "submit-description", variant: ButtonVariant.primary, onClick: onSubmit, isLoading: props.isUpdating, isDisabled: isDescriptionEmpty || showValidationError || props.isUpdating, "data-tracking-id": "reopen-case-description-modal-submit" },
108
102
  React.createElement(Trans, null, "Reopen case")),
@@ -1 +1 @@
1
- {"version":3,"file":"RemoteSessionAgreementModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAgBnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;CACrB;AAiBD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBA0WxD"}
1
+ {"version":3,"file":"RemoteSessionAgreementModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAgBnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;CACrB;AAiBD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBAqWxD"}
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { publicApi } from '@cee-eng/hydrajs';
11
- import { Alert, Button, ButtonVariant, Checkbox, Modal, ModalBody, ModalFooter, ModalHeader, TextArea, TextInput, } from '@patternfly/react-core';
11
+ import { Alert, Button, ButtonVariant, Checkbox, Modal, ModalFooter, TextArea, TextInput, } from '@patternfly/react-core';
12
12
  import DownloadIcon from '@patternfly/react-icons/dist/js/icons/download-icon';
13
13
  import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
14
14
  import { SingleSelectDropdown, ToastNotification, useFetch } from '@rh-support/components';
@@ -64,18 +64,16 @@ export function RemoteSessionAgreementModal(props) {
64
64
  try {
65
65
  const { siteCode, eventCode, loggedInUser } = props;
66
66
  const response = yield request(siteCode, eventCode, loggedInUser);
67
- if (response) {
68
- let defaultTranslation = response[0].translations[0];
69
- const translationLangInfoMap = response[0].translations.reduce((allTranslationsmap, translation) => {
70
- if (translation.isDefault) {
71
- defaultTranslation = translation;
72
- }
73
- allTranslationsmap[translation['localeCode']] = translation;
74
- return allTranslationsmap;
75
- }, {});
76
- setSelectedTranslation(defaultTranslation);
77
- setAllTranslations(translationLangInfoMap);
78
- }
67
+ let defaultTranslation = response[0].translations[0];
68
+ const translationLangInfoMap = response[0].translations.reduce((allTranslationsmap, translation) => {
69
+ if (translation.isDefault) {
70
+ defaultTranslation = translation;
71
+ }
72
+ allTranslationsmap[translation['localeCode']] = translation;
73
+ return allTranslationsmap;
74
+ }, {});
75
+ setSelectedTranslation(defaultTranslation);
76
+ setAllTranslations(translationLangInfoMap);
79
77
  }
80
78
  catch (e) {
81
79
  console.log(e);
@@ -201,7 +199,7 @@ export function RemoteSessionAgreementModal(props) {
201
199
  React.createElement("p", { className: "pf-v6-u-mt-md" },
202
200
  React.createElement(Trans, null, "Please read and accept the remote session terms below to allow Red Hat to access your network or systems.")),
203
201
  React.createElement("div", { className: "pf-v6-u-display-flex pf-v6-u-align-items-center pf-v6-u-flex-wrap" },
204
- React.createElement(SingleSelectDropdown, { id: "terms-language-selector", ariaLabel: t('Select language'), selected: selectedLanguage, options: languageOptions, isDisabled: false, placeholder: t('Select an option that best fits'), onSelect: (option) => onLangChange(option), toggleClassName: "pf-v6-u-w-50" }),
202
+ React.createElement(SingleSelectDropdown, { id: "terms-language-selector", ariaLabel: t('Select language'), selected: selectedLanguage, options: languageOptions, isDisabled: false, placeholder: t('Select an option that best fits'), onSelect: (option) => onLangChange(option), className: "pf-v6-u-mt-md", toggleClassName: "pf-v6-u-w-50" }),
205
203
  React.createElement("a", { "aria-label": t('Download'), "data-tracking-id": "rsa-modal-terms-download", className: "pf-v6-u-ml-md pf-v6-u-display-inline-flex pf-v6-u-align-items-center", href: selectedTranslation.pdfDownloadUrl, rel: "noopener noreferrer", target: "_blank" },
206
204
  t('Download'),
207
205
  " ",
@@ -218,13 +216,11 @@ export function RemoteSessionAgreementModal(props) {
218
216
  return isRemoteSessionForm || remoteSessionTermsAcked ? renderRemoteSessionForm : renderRemoteSessionAgreement;
219
217
  };
220
218
  return (React.createElement(Modal, { id: "remote-session-agreement-modal", "aria-label": isRemoteSessionForm || remoteSessionTermsAcked
219
+ ? t('Request remote session')
220
+ : t('Remote session agreement'), title: isRemoteSessionForm || remoteSessionTermsAcked
221
221
  ? t('Request remote session')
222
222
  : t('Remote session agreement'), isOpen: props.show, onClose: onCancel },
223
- React.createElement(ModalHeader, null,
224
- React.createElement("h2", null, isRemoteSessionForm || remoteSessionTermsAcked
225
- ? t('Request remote session')
226
- : t('Remote session agreement'))),
227
- React.createElement(ModalBody, null, RemoteSessionAgreementModalBody()),
223
+ RemoteSessionAgreementModalBody(),
228
224
  React.createElement(ModalFooter, null,
229
225
  React.createElement(Button, { "aria-label": t('I agree'), variant: ButtonVariant.primary, onClick: isRemoteSessionForm || remoteSessionTermsAcked ? onSubmit : toggleRemoteSessionForm, "data-tracking-id": isRemoteSessionForm || remoteSessionTermsAcked
230
226
  ? 'remote-session-details-submission'
@@ -103,7 +103,7 @@ function CaseHostname(props) {
103
103
  React.createElement("p", null, "You can share this information at any time to improve your support experience."),
104
104
  React.createElement(Switch, { label: shareHostnameLabel, isChecked: isShareHostNamesChecked, onChange: onShareHostnameCheck }),
105
105
  isHostnamesLoading && (React.createElement(Spinner, { size: "lg", className: "pf-v6-u-ml-sm hostnameSpinner", "aria-label": "Hostname loading" }))));
106
- if (!canUseHostName) {
106
+ if (!canUseHostName && canUseHostName) {
107
107
  return React.createElement(React.Fragment, null);
108
108
  }
109
109
  const lengthError = (hostnameState === null || hostnameState === void 0 ? void 0 : hostnameState.length) > HOSTNAME_LENGTH_LIMIT;
@@ -81,14 +81,11 @@
81
81
  display: flex;
82
82
  align-items: center;
83
83
  }
84
-
85
84
  #options-menu-top-pagination {
86
85
  display: flex !important;
87
86
  flex-wrap: nowrap !important;
88
87
  justify-content: flex-start;
89
- margin-left: 1rem;
90
88
  }
91
-
92
89
  .timeline-sort-order-select {
93
90
  width: auto;
94
91
  margin-left: 1rem;
@@ -285,11 +282,6 @@ ul#case-history-paginated-timeline {
285
282
  height: 100% !important;
286
283
  }
287
284
 
288
- .case-history-timeline-datepicker .pf-v6-c-calendar-month__header-year input {
289
- font-size: var(--pf-t--global--font--size--body--default);
290
- line-height: var(--pf-t--global--font--line-height--body);
291
- }
292
-
293
285
  .empty-state-date-picker {
294
286
  margin-left: 82%;
295
287
  }
@@ -1 +1 @@
1
- {"version":3,"file":"RHAssociatesSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/RHAssociatesSelector.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAS5D,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,oBAAoB,CAAC,KAAK,EAAE,MAAM,qBAqN1C;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
1
+ {"version":3,"file":"RHAssociatesSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/RHAssociatesSelector.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAS5D,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,oBAAoB,CAAC,KAAK,EAAE,MAAM,qBA+M1C;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
@@ -100,7 +100,6 @@ function RHAssociatesSelector(props) {
100
100
  onNotifiedUserChange([Object.assign(Object.assign({}, loggedInUser.data), { accountNumber: loggedInUserRights.data.getAccountNumber() })], true);
101
101
  });
102
102
  const removeCurrentUser = () => {
103
- console.log(isCurrentUserSelectedInternalNotifiedUser());
104
103
  if (isCurrentUserSelectedInternalNotifiedUser()) {
105
104
  onNotifiedUserChange(filter(selectedNotificationContacts, (contact) => contact.ssoUsername !== loggedInUser.data.ssoUsername));
106
105
  }
@@ -111,23 +110,21 @@ function RHAssociatesSelector(props) {
111
110
  };
112
111
  const canNotifyRHAssociates = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.NOTIFY_RH_ASSOCIATES);
113
112
  const toolTipRef = useRef();
114
- const contactsToExclude = !isEmpty(selectedOwner.data) ? [{ ssoUsername: selectedOwner.data.ssoUsername }] : [];
115
113
  if (!canNotifyRHAssociates)
116
114
  return React.createElement(React.Fragment, null);
117
115
  return (React.createElement(React.Fragment, null, canNotifyRHAssociates && (React.createElement("div", { className: "form-group" },
118
116
  React.createElement("label", { className: "react-typeahead-label-wrapper", htmlFor: "get-support-notifications" },
119
117
  React.createElement(Trans, null, "Internal Contacts"),
120
- React.createElement(ContactSelectorInternal, { className: "push-bottom-narrow", selectedContacts: filter(selectedNotificationContacts, (c) => c.isInternal), showSelectedContacts: true, contactsToExclude: contactsToExclude, disableContactRemoval: contactsToExclude, id: "open-case-rh-notifications", name: "open-case-rh-notifications", multiple: true, contactListParams: {
118
+ React.createElement(ContactSelectorInternal, { className: "push-bottom-narrow", selectedContacts: filter(selectedNotificationContacts, (c) => c.isInternal), showSelectedContacts: true, contactsToExclude: !isEmpty(selectedOwner.data) ? [{ ssoUsername: selectedOwner.data.ssoUsername }] : [], id: "open-case-rh-notifications", name: "open-case-rh-notifications", multiple: true, contactListParams: {
121
119
  internal: false, // to get non-ldap contacts only
122
120
  isInternalContact: true,
123
121
  }, placeholder: t(`Add an internal associate to watch this case`), onSelect: onNotifiedUserChange, renderToken: renderToken, isUpdating: isRHAssociatesUpdating, "data-tracking-id": "case-contact-select-rh-watcher" })),
124
- caseNumber && showAddWatchButton() && !isExportingPDF && (React.createElement(Button, { className: "add-watcher-button", variant: "secondary", onClick: addCurrentUser, type: "button", "data-tracking-id": "case-add-me-rh-watcher", isDisabled: isRHAssociatesUpdating },
122
+ caseNumber && showAddWatchButton() && !isExportingPDF && (React.createElement(Button, { variant: "secondary", onClick: addCurrentUser, type: "button", "data-tracking-id": "case-add-me-rh-watcher" },
125
123
  React.createElement(Trans, null, "Add me as a watcher"))),
126
- caseNumber && showRemoveWatchButton() && !isExportingPDF && (React.createElement("div", { className: "remove-me-as-watcher pf-v6-u-display-inline-block" }, isCurrentUserCaseContact ? (React.createElement(React.Fragment, null,
124
+ caseNumber && showRemoveWatchButton() && !isExportingPDF && (React.createElement("div", { ref: toolTipRef, className: "remove-me-as-watcher pf-v6-u-display-inline-block" }, isCurrentUserCaseContact ? (React.createElement(React.Fragment, null,
127
125
  React.createElement(Tooltip, { trigger: 'mouseenter focus', triggerRef: toolTipRef, position: TooltipPosition.top, content: React.createElement(Trans, null, "You are case contact and therefore you cannot be removed as watcher") }),
128
- React.createElement("div", { ref: toolTipRef },
129
- React.createElement(Button, { className: "remove-watcher-button", variant: "tertiary", onClick: removeCurrentUser, isDisabled: true, "data-tracking-id": "case-remove-me-rh-watcher-case-contact" },
130
- React.createElement(Trans, null, "Remove me as a watcher"))))) : (React.createElement(Button, { className: "remove-watcher-button", variant: "secondary", onClick: removeCurrentUser, "data-tracking-id": "case-remove-me-rh-watcher", isDisabled: isRHAssociatesUpdating },
126
+ React.createElement(Button, { variant: "tertiary", onClick: removeCurrentUser, type: "button", isDisabled: true, "data-tracking-id": "case-remove-me-rh-watcher-case-contact" },
127
+ React.createElement(Trans, null, "Remove me as a watcher")))) : (React.createElement(Button, { variant: "secondary", onClick: removeCurrentUser, type: "button", "data-tracking-id": "case-remove-me-rh-watcher" },
131
128
  React.createElement(Trans, null, "Remove me as a watcher")))))))));
132
129
  }
133
130
  export { RHAssociatesSelector };
@@ -1 +1 @@
1
- {"version":3,"file":"CaseContactSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/CaseContactSelector.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAgBvE,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAodzC;AAED,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"CaseContactSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/CaseContactSelector.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAgBvE,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBA4czC;AAED,eAAe,mBAAmB,CAAC"}
@@ -17,6 +17,7 @@ import differenceBy from 'lodash/differenceBy';
17
17
  import filter from 'lodash/filter';
18
18
  import find from 'lodash/find';
19
19
  import intersection from 'lodash/intersection';
20
+ import intersectionBy from 'lodash/intersectionBy';
20
21
  import isEmpty from 'lodash/isEmpty';
21
22
  import isEqual from 'lodash/isEqual';
22
23
  import map from 'lodash/map';
@@ -111,7 +112,7 @@ function CaseContactSelector(props) {
111
112
  });
112
113
  const processCaseContacts = (selectedContacts) => __awaiter(this, void 0, void 0, function* () {
113
114
  const toAdd = filter(differenceBy(selectedContacts, selectedNotificationContacts, 'ssoUsername'), (item) => item.ssoUsername !== contactSsoUsername);
114
- const toRemove = filter(differenceBy(selectedNotificationContacts, selectedContacts, 'ssoUsername'), (item) => !item.isInternal && item.ssoUsername !== contactSsoUsername);
115
+ const toRemove = filter(intersectionBy(selectedContacts, selectedNotificationContacts, 'ssoUsername'), (item) => !item.isInternal && item.ssoUsername !== contactSsoUsername);
115
116
  (toAdd.length || toRemove.length) && clearErrorState();
116
117
  if ((toAdd || []).length > 0) {
117
118
  if (loggedInUserRights.data.isOrgAdmin()) {
@@ -266,7 +267,7 @@ function CaseContactSelector(props) {
266
267
  React.createElement(CaseContactsSelectorExternal, { isDisabled: isUpdatingCustomEmails || isAssociatesUpdating, groupContactsAndEmails: true, allowCustomEmailAdd: true, contactSsoUsername: contactSsoUsername !== null && contactSsoUsername !== void 0 ? contactSsoUsername : '', loggedInUserRights: loggedInUserRights.data, selectedAccountNumber: accountNumber, selected: [
267
268
  ...customEmailsList.data,
268
269
  ...filter(selectedNotificationContacts, (c) => !c.isInternal),
269
- ], contactsToExclude: !isEmpty(selectedOwner.data) ? [selectedOwner.data] : [], onChange: onNotifiedUserChange, clearButton: true, multiple: true, placeholder: t('Search for an email address or username of the person you want to notify'), id: "open-case-notifications", name: "open-case-notifications", className: "react-select-custom", renderToken: renderToken, isUpdating: isAssociatesUpdating ||
270
+ ], contactsToExclude: !isEmpty(selectedOwner.data) ? [selectedOwner.data] : [], onChange: onNotifiedUserChange, clearButton: true, multiple: true, placeholder: t(`Search for an email address or username of the person you want to notify`), id: "open-case-notifications", name: "open-case-notifications", className: "react-select-custom", renderToken: renderToken, isUpdating: isAssociatesUpdating ||
270
271
  customEmailsList.isFetching ||
271
272
  isUpdatingCustomEmails ||
272
273
  isCaseOwnerUpdating, isExportingPDF: isExportingPDF, customEmails: accountCustomEmails.data || [], canAddNew: onAddNew, getCreateNewText: getCreateNewText })),
@@ -283,13 +284,12 @@ function CaseContactSelector(props) {
283
284
  " is not listed under your account. You can always",
284
285
  ' ',
285
286
  React.createElement(Button, { variant: "link", isInline: true, component: "span", onClick: onAddEmailToAccountBtnClick }, "add them at the account level"))))),
286
- caseNumber && showAddWatchButton() && !isExportingPDF && (React.createElement(Button, { className: "add-watcher-button", variant: "secondary", onClick: addCurrentUser, type: "button", "data-tracking-id": "case-add-me-watcher", isDisabled: isUpdatingCustomEmails || isAssociatesUpdating },
287
+ caseNumber && showAddWatchButton() && !isExportingPDF && (React.createElement(Button, { variant: "secondary", onClick: addCurrentUser, type: "button", "data-tracking-id": "case-add-me-watcher" },
287
288
  React.createElement(Trans, null, "Add me as a watcher"))),
288
- caseNumber && showRemoveWatchButton() && !isExportingPDF && (React.createElement("div", { className: "remove-me-as-watcher pf-v6-u-display-inline-block" }, isCurrentUserCaseContact ? (React.createElement(React.Fragment, null,
289
+ caseNumber && showRemoveWatchButton() && !isExportingPDF && (React.createElement("div", { ref: toolTipRef, className: "remove-me-as-watcher pf-v6-u-display-inline-block" }, isCurrentUserCaseContact ? (React.createElement(React.Fragment, null,
289
290
  React.createElement(Tooltip, { trigger: 'mouseenter focus', triggerRef: toolTipRef, position: TooltipPosition.top, content: React.createElement(Trans, null, "You are case contact and therefore you cannot be removed as watcher") }),
290
- React.createElement("div", { className: "pf-v6-u-display-inline-block", ref: toolTipRef },
291
- React.createElement(Button, { className: "remove-watcher-button", variant: "tertiary", onClick: removeCurrentUser, type: "button", isDisabled: true, "data-tracking-id": "case-remove-me-watcher" },
292
- React.createElement(Trans, null, "Remove me as a watcher"))))) : (React.createElement(Button, { className: "remove-watcher-button", variant: "secondary", onClick: removeCurrentUser, isDisabled: isUpdatingCustomEmails || isAssociatesUpdating, type: "button", "data-tracking-id": "case-remove-me-watcher" },
291
+ React.createElement(Button, { variant: "tertiary", onClick: removeCurrentUser, type: "button", isDisabled: true, "data-tracking-id": "case-remove-me-watcher" },
292
+ React.createElement(Trans, null, "Remove me as a watcher")))) : (React.createElement(Button, { variant: "secondary", onClick: removeCurrentUser, type: "button", "data-tracking-id": "case-remove-me-watcher" },
293
293
  React.createElement(Trans, null, "Remove me as a watcher"))))))) : (React.createElement(NonOrgCaseNotifyeesSelector, { id: "open-case-notifications", placeholder: t('Enter an email address or username for the person you want to notify'), isDisabled: isAssociatesUpdating || customEmailsList.isFetching || isUpdatingCustomEmails, selectedItems: [
294
294
  ...customEmailsList.data,
295
295
  ...filter(selectedNotificationContacts, (c) => !c.isInternal),
@@ -1 +1 @@
1
- {"version":3,"file":"NonOrgCaseNotifyeesSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAwB,oBAAoB,EAAY,MAAM,wBAAwB,CAAC;AAE9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAkD,MAAM,OAAO,CAAC;AAGvE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,aAAa,EAAE,oBAAoB,EAAE,CAAC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,aAAa,EAAE,oBAAoB,EAAE,KAAK,IAAI,CAAC;IAC1D,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC1C,kBAAkB,EAAE,MAAM,CAAC;CAC9B;AAqCD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBA2MxD"}
1
+ {"version":3,"file":"NonOrgCaseNotifyeesSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAwB,oBAAoB,EAAY,MAAM,wBAAwB,CAAC;AAE9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAkD,MAAM,OAAO,CAAC;AAGvE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,aAAa,EAAE,oBAAoB,EAAE,CAAC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,aAAa,EAAE,oBAAoB,EAAE,KAAK,IAAI,CAAC;IAC1D,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC1C,kBAAkB,EAAE,MAAM,CAAC;CAC9B;AAqCD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBA0MxD"}
@@ -144,7 +144,7 @@ export function NonOrgCaseNotifyeesSelector(props) {
144
144
  const isContactOption = isContact(option);
145
145
  const isCurrentUserCaseContact = isContactOption && option.ssoUsername === props.contactSsoUsername;
146
146
  const isDisabled = (props.isChipDisabled && isContactOption) || isCurrentUserCaseContact;
147
- return (React.createElement(Label, { key: getKey(option) || index, onClose: () => onRemoveItem(option), isDisabled: isDisabled, closeBtnAriaLabel: `Remove ${getHydraContactLabel(option)}`, variant: "outline" }, getHydraContactLabel(option)));
147
+ return (React.createElement(Label, { key: getKey(option) || index, onClose: !isDisabled ? () => onRemoveItem(option) : undefined, closeBtnAriaLabel: `Remove ${getHydraContactLabel(option)}`, variant: "outline" }, getHydraContactLabel(option)));
148
148
  })));
149
149
  };
150
150
  const menu = (React.createElement(Menu, { ref: menuRef },
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface IProps {
3
+ onChatWithAIClick?: () => void;
4
+ }
5
+ export declare const AskRedHat: React.FC<IProps>;
6
+ export {};
7
+ //# sourceMappingURL=AskRedHat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AskRedHat.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/AskRedHat.tsx"],"names":[],"mappings":"AACA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAOhD,UAAU,MAAM;IACZ,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAqJtC,CAAC"}