@rh-support/troubleshoot 2.1.20 → 2.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/OwnerSelector.js +3 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +4 -2
- package/lib/esm/components/CaseEditView/CaseOverview/CaseType.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseType.js +4 -2
- package/lib/esm/components/CaseEditView/CaseOverview/DateTime.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/DateTime.js +4 -2
- package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +4 -9
- package/lib/esm/components/CaseEditView/PDFContainer.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.js +4 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +23 -36
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +3 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +5 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +3 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +4 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +3 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +3 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +9 -17
- package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Fts.js +4 -2
- package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Severity.js +4 -3
- package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/Cep.js +4 -2
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +7 -3
- package/lib/esm/components/CaseManagement/OpenShiftV3Inputbox.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenShiftV3Inputbox.js +4 -2
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +6 -4
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +6 -8
- package/lib/esm/scss/_main.scss +1 -221
- package/lib/esm/scss/_pf4-overrides.scss +10 -0
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OwnerSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountInfo/OwnerSelector.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OwnerSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountInfo/OwnerSelector.tsx"],"names":[],"mappings":"AAqCA,UAAU,MAAM;CAAG;AAEnB,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,eA0RnC;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -22,6 +22,7 @@ import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
|
22
22
|
import { RouteContext } from '../../context/RouteContext';
|
|
23
23
|
import { useCaseUpdateErrorMessage } from '../../hooks/useCaseUpdateErrorMessage';
|
|
24
24
|
import { setCaseDetails, setCaseOwner, setCaseState, setNotifiedUser, updateCaseDetails, } from '../../reducers/CaseReducer';
|
|
25
|
+
import { PDFContext } from '../CaseEditView/PDFContainer';
|
|
25
26
|
import { CaseValuesToWatch } from '../shared/Constants';
|
|
26
27
|
import { getChangedValueTooltip } from '../shared/utils';
|
|
27
28
|
function OwnerSelector(props) {
|
|
@@ -39,6 +40,7 @@ function OwnerSelector(props) {
|
|
|
39
40
|
const caseDispatch = useCaseDispatch();
|
|
40
41
|
const { globalMetadataState: { loggedInUserRights, loggedInUser }, } = useContext(GlobalMetadataStateContext);
|
|
41
42
|
const previousAccountNumber = usePrevious(accountNumber);
|
|
43
|
+
const { isExportingPDF } = useContext(PDFContext);
|
|
42
44
|
const [usersWithGroupAccess, setUsersWithGroupAccess] = useState([]);
|
|
43
45
|
const [localOwnerChange, setLocalOwnerChange] = useState(false);
|
|
44
46
|
const afterLocalChange = () => setLocalOwnerChange(false);
|
|
@@ -211,7 +213,7 @@ function OwnerSelector(props) {
|
|
|
211
213
|
React.createElement("label", { htmlFor: "get-support-owner" },
|
|
212
214
|
React.createElement(Trans, null, "Owner"),
|
|
213
215
|
React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, comparator: ownerComparator, isLocalChange: localOwnerChange, value: selectedOwner.data, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.owner, (v) => v.fullNameCustom) }),
|
|
214
|
-
React.createElement("span", { className:
|
|
216
|
+
React.createElement("span", { className: `form-required ${isExportingPDF ? 'hide-in-pdf' : ''}`, "aria-hidden": true }, "*")),
|
|
215
217
|
showUsersWithSelectedGroupAccess ? (React.createElement(Typeahead, { id: "get-support-owner", className: "react-select-custom", clearButton: true, isLoading: selectedCaseGroupUsers.isFetching || isCaseOwnerUpdating, options: usersWithGroupAccess, selected: !isEmpty(selectedOwner.data) ? [selectedOwner.data] : [], onChange: onCustomerContactSelect, labelKey: getHydraContactLabel, placeholder: t(`Search by name or username`), disabled: selectedCaseGroupUsers.isFetching || isCaseOwnerUpdating, renderMenuItemChildren: renderMenuItemChildren, "data-tracking-id": "get-support-owner" })) : (React.createElement(CaseContactsSelectorExternal, { loggedInUserRights: loggedInUserRights.data, selectedAccountNumber: accountNumber, selected: !isEmpty(selectedOwner.data) ? [selectedOwner.data] : [], onChange: onCustomerContactSelect, placeholder: t(`Search by name or username`), clearButton: true, id: "get-support-owner", name: "get-support-owner", className: "react-select-custom", isUpdating: isCaseOwnerUpdating, isInvalid: isNextBtnClickedToShowValidationError && isEmpty(selectedOwner.data) }))));
|
|
216
218
|
}
|
|
217
219
|
export { OwnerSelector };
|
|
@@ -105,7 +105,7 @@ export function CaseDetailsTabs(props) {
|
|
|
105
105
|
};
|
|
106
106
|
const isTabVisibleInPdfExport = (tab) => tab.title === CaseDetailsTabsEnum.DISCUSSION && pdfOption === 'Reduced' ? false : true;
|
|
107
107
|
return (React.createElement("div", { className: "case-details-tabs", ref: props.tabdRef },
|
|
108
|
-
React.createElement(Tabs, { className:
|
|
108
|
+
React.createElement(Tabs, { className: isExportingPDF ? 'hide-in-pdf' : '', activeKey: getActiveTabKey(), component: TabsComponent.nav, onSelect: handleTabClick }, tabsToRender.map((tab, index) => (React.createElement(Tab, { eventKey: index, tabContentRef: tab.ref, tabContentId: tab.key, key: tab.title, href: `#${props.basePath}/${tab.routePath}`, "data-tracking-id": tab['data-tracking-id'], title: React.createElement(TabTitleText, null,
|
|
109
109
|
React.createElement(Trans, null, tab.title)) })))),
|
|
110
110
|
React.createElement("div", { className: "case-details-tabs-content pf-u-pt-xl" }, tabsToRender.map((tab, index) => (React.createElement(TabContent, { eventKey: index, key: tab.key, id: tab.key, ref: tab.ref, "aria-label": tab.title, hidden: isExportingPDF ? !isTabVisibleInPdfExport(tab) : index !== getActiveTabKey() },
|
|
111
111
|
React.createElement(ErrorBoundary, { errorMsgInfo: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseStatus.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/CaseStatus.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAW,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseStatus.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/CaseStatus.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAW,MAAM,0BAA0B,CAAC;AAUrE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtD,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACrB;AAOD,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,eAoDhC;kBApDQ,UAAU;;;AAuDnB,eAAe,UAAU,CAAC"}
|
|
@@ -10,10 +10,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { Dropdown, ValueChangedIcon } from '@rh-support/components';
|
|
11
11
|
import { toOption, toOptions } from '@rh-support/utils';
|
|
12
12
|
import isEmpty from 'lodash/isEmpty';
|
|
13
|
-
import React, { useState } from 'react';
|
|
13
|
+
import React, { useContext, useState } from 'react';
|
|
14
14
|
import { Trans, useTranslation } from 'react-i18next';
|
|
15
15
|
import { CaseValuesToWatch } from '../../shared/Constants';
|
|
16
16
|
import { getChangedValueTooltip } from '../../shared/utils';
|
|
17
|
+
import { PDFContext } from '../PDFContainer';
|
|
17
18
|
const defaultProps = {
|
|
18
19
|
id: '',
|
|
19
20
|
className: '',
|
|
@@ -24,6 +25,7 @@ function CaseStatus(props) {
|
|
|
24
25
|
const validateCaseStatus = (selectedItem) => {
|
|
25
26
|
setIsCaseStatusInValid(isEmpty(selectedItem));
|
|
26
27
|
};
|
|
28
|
+
const { isExportingPDF } = useContext(PDFContext);
|
|
27
29
|
// value changed logic to show a non local status change
|
|
28
30
|
const [localStatusChange, setLocalStatusChange] = useState(false);
|
|
29
31
|
const afterLocalChange = () => setLocalStatusChange(false);
|
|
@@ -39,7 +41,7 @@ function CaseStatus(props) {
|
|
|
39
41
|
React.createElement("h3", { className: "subheading subheading-sm" },
|
|
40
42
|
React.createElement(Trans, null, "Status"),
|
|
41
43
|
React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localStatusChange, value: props.selectedStatus, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.status) }),
|
|
42
|
-
React.createElement("span", { className:
|
|
44
|
+
React.createElement("span", { className: `form-required ${isExportingPDF ? 'hide-in-pdf' : ''}`, "aria-hidden": true }, "*")),
|
|
43
45
|
React.createElement(Dropdown, { name: "case-details-status-selector", placeholder: t(`Select a status`), title: t(`Select a status`), list: props.allStatuses ? toOptions(props.allStatuses) : [], selectedItem: toOption(props.selectedStatus), disabled: props.hasError || props.isDisabled, isLoadingList: props.isFetching, isInValid: isCaseStatusInValid, required: true, onChange: onCaseStatusChange, onOuterClick: validateCaseStatus, "data-tracking-id": "case-details-status-selector" })));
|
|
44
46
|
}
|
|
45
47
|
CaseStatus.defaultProps = defaultProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseType.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/CaseType.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAW,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseType.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/CaseType.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAW,MAAM,0BAA0B,CAAC;AAUrE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,GAAG,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACrB;AAOD,iBAAS,QAAQ,CAAC,KAAK,EAAE,MAAM,eAsD9B;kBAtDQ,QAAQ;;;AAyDjB,eAAe,QAAQ,CAAC"}
|
|
@@ -10,10 +10,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { Dropdown, ValueChangedIcon } from '@rh-support/components';
|
|
11
11
|
import { toOldCaseTypeSwitcher, toOption, toOptions } from '@rh-support/utils';
|
|
12
12
|
import isEmpty from 'lodash/isEmpty';
|
|
13
|
-
import React, { useState } from 'react';
|
|
13
|
+
import React, { useContext, useState } from 'react';
|
|
14
14
|
import { Trans, useTranslation } from 'react-i18next';
|
|
15
15
|
import { CaseValuesToWatch } from '../../shared/Constants';
|
|
16
16
|
import { getChangedValueTooltip } from '../../shared/utils';
|
|
17
|
+
import { PDFContext } from '../PDFContainer';
|
|
17
18
|
const defaultProps = {
|
|
18
19
|
id: '',
|
|
19
20
|
className: '',
|
|
@@ -21,6 +22,7 @@ const defaultProps = {
|
|
|
21
22
|
function CaseType(props) {
|
|
22
23
|
const { t } = useTranslation();
|
|
23
24
|
const [isCaseTypeInValid, setIsCaseTypeInValid] = useState(false);
|
|
25
|
+
const { isExportingPDF } = useContext(PDFContext);
|
|
24
26
|
const validateCaseType = (selectedItem) => {
|
|
25
27
|
setIsCaseTypeInValid(isEmpty(selectedItem));
|
|
26
28
|
};
|
|
@@ -40,7 +42,7 @@ function CaseType(props) {
|
|
|
40
42
|
React.createElement("h3", { className: "subheading subheading-sm" },
|
|
41
43
|
React.createElement(Trans, null, "Support type"),
|
|
42
44
|
React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localTypeChange, value: props.selectedType, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.type) }),
|
|
43
|
-
React.createElement("span", { className:
|
|
45
|
+
React.createElement("span", { className: `form-required ${isExportingPDF ? 'hide-in-pdf' : ''}`, "aria-hidden": true }, "*")),
|
|
44
46
|
React.createElement(Dropdown, { name: "get-support-type", placeholder: t(`Select`), title: t(`Select a category`), list: toOptions(props.allTypes || []), selectedItem: toOption(props.selectedType), disabled: props.hasError || props.isDisabled, isLoadingList: props.isFetching, isInValid: isCaseTypeInValid, required: true, onChange: onCaseTypeChange, onOuterClick: validateCaseType, "data-tracking-id": "case-details-type-selector" })));
|
|
45
47
|
}
|
|
46
48
|
CaseType.defaultProps = defaultProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTime.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/DateTime.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DateTime.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/DateTime.tsx"],"names":[],"mappings":"AAOA,UAAU,MAAM;IACZ,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC;IAC/C,cAAc,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAiBD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC7B,WAAkB,EAClB,iBAA4C,EAC5C,cAAsC,EACtC,cAAmB,EACnB,MAAgB,GACnB,EAAE,MAAM,eAqBR"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Tooltip } from '@patternfly/react-core';
|
|
2
2
|
import InfoIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
3
3
|
import { formatDateTime } from '@rh-support/utils';
|
|
4
|
-
import React from 'react';
|
|
4
|
+
import React, { useContext } from 'react';
|
|
5
|
+
import { PDFContext } from '../PDFContainer';
|
|
5
6
|
const defaultDateTimeFormat = {
|
|
6
7
|
month: 'short',
|
|
7
8
|
day: 'numeric',
|
|
@@ -12,10 +13,11 @@ const defaultDateTimeFormat = {
|
|
|
12
13
|
};
|
|
13
14
|
const defaultToolTipTimeFormat = Object.assign(Object.assign({}, defaultDateTimeFormat), { weekday: 'short', timeZoneName: 'short' });
|
|
14
15
|
export default function DateTime({ showToolTip = true, toolTipTimeFormat = defaultToolTipTimeFormat, dateTimeFormat = defaultDateTimeFormat, dateTimeString = '', locale = 'en-us', }) {
|
|
16
|
+
const { isExportingPDF } = useContext(PDFContext);
|
|
15
17
|
if (!dateTimeString)
|
|
16
18
|
return React.createElement(React.Fragment, null);
|
|
17
19
|
return (React.createElement(React.Fragment, null,
|
|
18
20
|
React.createElement("time", { dateTime: dateTimeString }, formatDateTime(dateTimeString, locale, dateTimeFormat)),
|
|
19
21
|
showToolTip && (React.createElement(Tooltip, { content: React.createElement("time", { dateTime: dateTimeString }, formatDateTime(dateTimeString, locale, toolTipTimeFormat)) },
|
|
20
|
-
React.createElement(InfoIcon, { className:
|
|
22
|
+
React.createElement(InfoIcon, { className: `pf-u-ml-sm ${isExportingPDF ? 'hide-in-pdf' : ''}` })))));
|
|
21
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/index.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAA8D,MAAM,OAAO,CAAC;AA6BnF,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,eA4ejD"}
|
|
@@ -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 { Alert, AlertVariant, Button, ButtonVariant, ExpandableSection, Label
|
|
10
|
+
import { Alert, AlertVariant, Button, ButtonVariant, ExpandableSection, Label } from '@patternfly/react-core';
|
|
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';
|
|
@@ -27,7 +27,6 @@ import { ReopenCaseModal } from '../ConfirmationModals/ReopenCaseModal';
|
|
|
27
27
|
import { PDFContext } from '../PDFContainer';
|
|
28
28
|
import { CaseInformation } from '../Tabs/CaseDetails/CaseInformation';
|
|
29
29
|
import { CaseContactPhoneNumberAlert } from '../Tabs/CaseDetails/CasePhoneNumberConfirmAlert';
|
|
30
|
-
import { CasePhoneNumberSev1ConfirmAlert } from '../Tabs/CaseDetails/CasePhoneNumberSev1ConfirmAlert';
|
|
31
30
|
import Summary from '../Tabs/CaseDetails/Summary';
|
|
32
31
|
import CaseOwnerInfo from './CaseOwnerInfo';
|
|
33
32
|
import CaseStatus from './CaseStatus';
|
|
@@ -173,11 +172,8 @@ export default function CaseOverview(props) {
|
|
|
173
172
|
else {
|
|
174
173
|
yield confirm({
|
|
175
174
|
catchOnCancel: true,
|
|
176
|
-
title: t(`
|
|
177
|
-
description: t('Are you sure you want to change
|
|
178
|
-
confirmText: t('Yes, confirm'),
|
|
179
|
-
cancelText: t('No, cancel'),
|
|
180
|
-
modalVariant: ModalVariant.small,
|
|
175
|
+
title: t(`Status has been changed`),
|
|
176
|
+
description: t('Are you sure you want to change this case status to {{newStatus}}?', { newStatus }),
|
|
181
177
|
});
|
|
182
178
|
updateStatusState(newStatus);
|
|
183
179
|
}
|
|
@@ -233,7 +229,6 @@ export default function CaseOverview(props) {
|
|
|
233
229
|
React.createElement("p", { className: "pf-u-mb-sm" },
|
|
234
230
|
React.createElement(Trans, null, "The customer has received two warnings regarding inactivity. This case will be closed soon if we don't receive any input."))) })))),
|
|
235
231
|
React.createElement(CaseContactPhoneNumberAlert, { isReview: true, tabRef: props.tabsRef }),
|
|
236
|
-
React.createElement(CasePhoneNumberSev1ConfirmAlert, { isReview: true, tabRef: props.tabsRef }),
|
|
237
232
|
React.createElement("header", null,
|
|
238
233
|
React.createElement("h2", { className: "case-ID" },
|
|
239
234
|
React.createElement(Trans, null, "Case"),
|
|
@@ -249,7 +244,7 @@ export default function CaseOverview(props) {
|
|
|
249
244
|
: 'case-reopen-btn-case-details-overview' }),
|
|
250
245
|
React.createElement(Trans, null, isCaseInOpenState ? 'Close case' : 'Reopen case')))),
|
|
251
246
|
React.createElement("div", { className: `case-details-header-secondary push-bottom-narrow ${isExportingPDF && !viewAsCustomer ? 'hide-in-pdf' : ''}` },
|
|
252
|
-
React.createElement("span", { className:
|
|
247
|
+
React.createElement("span", { className: `case-support-level ${isExportingPDF ? 'hide-in-pdf' : ''}` }, computeSupportLink())),
|
|
253
248
|
React.createElement("div", { className: "case-details-summary push-bottom-narrow" },
|
|
254
249
|
React.createElement(Summary, { inlineEditable: true, hideLabel: true })),
|
|
255
250
|
canSeeManagedByPartnerFlag && (React.createElement(Label, { className: "push-right-narrow", color: "green" },
|
|
@@ -51,7 +51,7 @@ export function PDFContainer(props) {
|
|
|
51
51
|
React.createElement(Trans, null, "Case export doesn't support selected language.")) },
|
|
52
52
|
React.createElement(DownloadIcon, { className: "fake-disable", role: "button", title: "Export as PDF", "aria-disabled": "true" })));
|
|
53
53
|
}
|
|
54
|
-
return (React.createElement(Button, { title: "Export as PDF", variant: "link", isInline: true, className:
|
|
54
|
+
return (React.createElement(Button, { title: "Export as PDF", variant: "link", isInline: true, className: isExportingPDF ? 'hide-in-pdf' : '', "data-tracking-id": "export-case-as-pdf", onClick: openModal(caseNumber), disabled: isExportingPDF, icon: React.createElement(DownloadIcon, null), iconPosition: "right" },
|
|
55
55
|
React.createElement(Trans, null, "Export")));
|
|
56
56
|
}
|
|
57
57
|
const exportToPDF = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseActionPlan.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseActionPlan.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.tsx"],"names":[],"mappings":"AAqBA,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,iBAAS,cAAc,CAAC,KAAK,EAAE,MAAM,eAqIpC;kBArIQ,cAAc;;;AAwIvB,eAAe,cAAc,CAAC"}
|
|
@@ -18,6 +18,7 @@ import { Trans, useTranslation } from 'react-i18next';
|
|
|
18
18
|
import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
|
|
19
19
|
import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
|
|
20
20
|
import { updateCaseDetails } from '../../../../reducers/CaseReducer';
|
|
21
|
+
import { PDFContext } from '../../PDFContainer';
|
|
21
22
|
const defaultProps = {
|
|
22
23
|
caseNumber: undefined,
|
|
23
24
|
};
|
|
@@ -32,6 +33,7 @@ function CaseActionPlan(props) {
|
|
|
32
33
|
const [actionPlanState, setActionPlan] = useState(actionPlan);
|
|
33
34
|
const [formIsDirty, setFormIsDirty] = useState(false);
|
|
34
35
|
const [isUpdating, setIsUpdating] = useState(false);
|
|
36
|
+
const { isExportingPDF } = useContext(PDFContext);
|
|
35
37
|
useEffect(() => {
|
|
36
38
|
if (actionPlan !== actionPlanState) {
|
|
37
39
|
setActionPlan(actionPlanState);
|
|
@@ -85,9 +87,9 @@ function CaseActionPlan(props) {
|
|
|
85
87
|
React.createElement(Trans, null, "Action plan")),
|
|
86
88
|
!canUpdateActionPlan && (React.createElement("pre", { "aria-label": t('Case Action Plan'), dangerouslySetInnerHTML: commentMarkdown(actionPlan) })),
|
|
87
89
|
canUpdateActionPlan && (React.createElement("form", null,
|
|
88
|
-
React.createElement("div", { className:
|
|
90
|
+
React.createElement("div", { className: isExportingPDF ? 'hide-in-pdf' : '' },
|
|
89
91
|
React.createElement(TextAreaResizable, { className: "form-control", id: "rha-action-plan", disabled: isUpdating || isInternalWithoutSFDCUser, maxLength: 32768, name: "actionPlan", value: actionPlanState, onChange: onChange, rowsMin: 3 })),
|
|
90
|
-
!isInternalWithoutSFDCUser && (React.createElement("div", { className:
|
|
92
|
+
!isInternalWithoutSFDCUser && (React.createElement("div", { className: `${isExportingPDF ? 'hide-in-pdf' : ''} push-top-narrow` },
|
|
91
93
|
React.createElement("button", { className: "btn btn-app btn-primary", onClick: updateCase, disabled: isActionPlanEmpty || isUpdating || !formIsDirty },
|
|
92
94
|
React.createElement(Trans, null, "Submit"),
|
|
93
95
|
" ",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.tsx"],"names":[],"mappings":"AAgBA,wBAAgB,sBAAsB,gBA8GrC"}
|
|
@@ -7,13 +7,13 @@ 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 { InputGroupText, InputGroupTextVariant,
|
|
10
|
+
import { InputGroupText, InputGroupTextVariant, ValidatedOptions } from '@patternfly/react-core';
|
|
11
11
|
import CheckIcon from '@patternfly/react-icons/dist/js/icons/check-icon';
|
|
12
12
|
import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
|
|
13
|
-
import {
|
|
13
|
+
import { PhoneInput, ToastNotification } from '@rh-support/components';
|
|
14
14
|
import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
|
|
15
15
|
import isEqual from 'lodash/isEqual';
|
|
16
|
-
import React, { useContext,
|
|
16
|
+
import React, { useContext, useState } from 'react';
|
|
17
17
|
import { Trans, useTranslation } from 'react-i18next';
|
|
18
18
|
import { PHONE_INSTRUCTION } from '../../../../constants/caseDetailsConstants';
|
|
19
19
|
import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
|
|
@@ -21,6 +21,7 @@ import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorM
|
|
|
21
21
|
import { PHONE_LIMIT } from '../../../../reducers/CaseConstNTypes';
|
|
22
22
|
import { updateCaseDetails } from '../../../../reducers/CaseReducer';
|
|
23
23
|
import { ContactPhoneNumberPopOver } from '../../../CaseInformation/ContactPhoneNumberPopOver';
|
|
24
|
+
import { PDFContext } from '../../PDFContainer';
|
|
24
25
|
export function CaseContactPhoneNumber() {
|
|
25
26
|
const { phone, caseNumber, contactSSOName, suppliedPhoneNumberVerified, isCaseOwnerUpdating } = useCaseSelector((state) => ({
|
|
26
27
|
phone: state.caseDetails.phone || '',
|
|
@@ -36,6 +37,7 @@ export function CaseContactPhoneNumber() {
|
|
|
36
37
|
const caseDispatch = useCaseDispatch();
|
|
37
38
|
const caseUpdateError = useCaseUpdateErrorMessage();
|
|
38
39
|
const { t } = useTranslation();
|
|
40
|
+
const { isExportingPDF } = useContext(PDFContext);
|
|
39
41
|
// To handle phone change
|
|
40
42
|
const onPhoneChange = (phone) => __awaiter(this, void 0, void 0, function* () {
|
|
41
43
|
if (canEditCase.alert())
|
|
@@ -54,43 +56,28 @@ export function CaseContactPhoneNumber() {
|
|
|
54
56
|
caseUpdateError.showError(e, t(`Phone number failed to update`));
|
|
55
57
|
}
|
|
56
58
|
});
|
|
57
|
-
const
|
|
58
|
-
setLocalPhoneState(
|
|
59
|
+
const onClear = () => {
|
|
60
|
+
setLocalPhoneState('');
|
|
61
|
+
onSave();
|
|
59
62
|
};
|
|
60
|
-
// Function to handle keyDown events
|
|
61
|
-
const handleKeyDown = (e) => __awaiter(this, void 0, void 0, function* () {
|
|
62
|
-
// Cancel on pressing esc
|
|
63
|
-
if (e.keyCode === 27) {
|
|
64
|
-
yield onCancel();
|
|
65
|
-
}
|
|
66
|
-
// Save on pressing enter
|
|
67
|
-
else if (!isCasePhoneUpdating && e.keyCode === 13) {
|
|
68
|
-
yield onSave();
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
useEffect(() => {
|
|
72
|
-
setLocalPhoneState(phone);
|
|
73
|
-
}, [phone]);
|
|
74
63
|
const maxLengthErrorMessage = t('Phone number cannot be more than {{limit}} characters.', {
|
|
75
64
|
limit: PHONE_LIMIT,
|
|
76
65
|
});
|
|
77
66
|
const isPhoneNeedsReview = contactSSOName === loggedInUser.data.ssoUsername && suppliedPhoneNumberVerified === 'Deferred';
|
|
78
67
|
return (React.createElement("div", { className: "form-group", style: { minWidth: '200px' } },
|
|
79
|
-
React.createElement(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
(localPhoneState === null || localPhoneState === void 0 ? void 0 : localPhoneState.length) > PHONE_LIMIT ? (React.createElement("p", { className: "form-instructions form-invalid" }, maxLengthErrorMessage)) : (React.createElement("p", { className: "form-instructions" },
|
|
95
|
-
React.createElement(Trans, null, PHONE_INSTRUCTION))))));
|
|
68
|
+
React.createElement("h3", { className: `subheading subheading-sm ${isExportingPDF ? 'expand-input' : ''}` },
|
|
69
|
+
React.createElement(Trans, null, "Case owner's phone number"),
|
|
70
|
+
!isExportingPDF ? ContactPhoneNumberPopOver() : ''),
|
|
71
|
+
React.createElement(InputGroupText, { variant: InputGroupTextVariant.plain },
|
|
72
|
+
React.createElement(PhoneInput, { phoneValue: localPhoneState, onPhoneValueChange: onPhoneChange, validations: (localPhoneState === null || localPhoneState === void 0 ? void 0 : localPhoneState.length) > PHONE_LIMIT
|
|
73
|
+
? ValidatedOptions.error
|
|
74
|
+
: isPhoneNeedsReview
|
|
75
|
+
? ValidatedOptions.warning
|
|
76
|
+
: ValidatedOptions.default, isDisabled: isCasePhoneUpdating || isCaseOwnerUpdating, isLoading: isCasePhoneUpdating, "data-tracking-id": "case-details-page-supplied-phone" }),
|
|
77
|
+
React.createElement("button", { className: "btn btn-app btn-link pf-u-ml-sm", type: "button", "data-tracking-id": "case-details-page-supplied-phone-save", onClick: () => onSave(), disabled: (localPhoneState === null || localPhoneState === void 0 ? void 0 : localPhoneState.length) > PHONE_LIMIT || localPhoneState === phone, style: { display: isExportingPDF ? 'none' : '' } },
|
|
78
|
+
React.createElement(CheckIcon, null)),
|
|
79
|
+
React.createElement("button", { className: "btn btn-app btn-link", type: "button", onClick: onClear, "data-tracking-id": "case-details-page-supplied-phone-cancel", style: { display: isExportingPDF ? 'none' : '' } },
|
|
80
|
+
React.createElement(TimesIcon, { color: "#6A6E73" }))),
|
|
81
|
+
(localPhoneState === null || localPhoneState === void 0 ? void 0 : localPhoneState.length) > PHONE_LIMIT ? (React.createElement("p", { className: "form-instructions form-invalid" }, maxLengthErrorMessage)) : (React.createElement("p", { className: "form-instructions" },
|
|
82
|
+
React.createElement(Trans, null, PHONE_INSTRUCTION)))));
|
|
96
83
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseOpenshiftClusterId.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseOpenshiftClusterId.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.tsx"],"names":[],"mappings":"AA4BA,wBAAgB,sBAAsB,gBAmSrC"}
|
|
@@ -22,6 +22,7 @@ import { getIsClusterIdInvalid, isClusterIdEnabledForProduct, } from '../../../.
|
|
|
22
22
|
import { NoClusterIDReasonSelector } from '../../../../CaseManagement/NoClusterIDReasonSelector';
|
|
23
23
|
import { discoverV4ClusterIdLink, discoverV4ClusterIdLinkError, isInvalidErrorMessage, v3Tov4TransitionLink, } from '../../../../CaseManagement/OpenShiftClusterId';
|
|
24
24
|
import { OpenshiftDropdownV4 } from '../../../../CaseManagement/OpenshiftDropdownV4';
|
|
25
|
+
import { PDFContext } from '../../../PDFContainer';
|
|
25
26
|
export function CaseOpenshiftClusterId() {
|
|
26
27
|
const caseUpdateError = useCaseUpdateErrorMessage();
|
|
27
28
|
const { openshiftClusterID, product, version, caseNumber, openshiftClusterVersion, noClusterIdReason, noClusterIdReasonExplanation, selectedAccountDetails, description, } = useCaseSelector((state) => ({
|
|
@@ -52,6 +53,7 @@ export function CaseOpenshiftClusterId() {
|
|
|
52
53
|
const previousSelectedReason = usePrevious(selectedReason);
|
|
53
54
|
const previousProduct = usePrevious(product);
|
|
54
55
|
const { t } = useTranslation();
|
|
56
|
+
const { isExportingPDF } = useContext(PDFContext);
|
|
55
57
|
const clusterStateReset = () => {
|
|
56
58
|
setSelectedReason('');
|
|
57
59
|
setDontKnowSelected(false);
|
|
@@ -239,7 +241,7 @@ export function CaseOpenshiftClusterId() {
|
|
|
239
241
|
}
|
|
240
242
|
else {
|
|
241
243
|
return (React.createElement(React.Fragment, null,
|
|
242
|
-
React.createElement(OpenshiftDropdownV4, { openshiftDisplayName: displayName.current, openshiftClusterIDState: localOpenshiftClusterIDState || selectedReason, onClusterIdStateUpdate: onClusterIdSave, isClusterIdInvalid: (isEmpty(localOpenshiftClusterIDState) && isEmpty(selectedReason)) || isClusterIdInvalid, clusterIdDropdownFormInstructions: clusterIdDropdownFormInstructions(), onClusterClear: resetClusterData, isV3: product !== 'OpenShift Container Platform', isDisabled: isClusterIdUpdating, noClusterIdReasonExplanation: noClusterIdReasonExplanation }),
|
|
244
|
+
React.createElement(OpenshiftDropdownV4, { openshiftDisplayName: displayName.current, openshiftClusterIDState: localOpenshiftClusterIDState || selectedReason, onClusterIdStateUpdate: onClusterIdSave, isClusterIdInvalid: (isEmpty(localOpenshiftClusterIDState) && isEmpty(selectedReason)) || isClusterIdInvalid, clusterIdDropdownFormInstructions: !isExportingPDF ? clusterIdDropdownFormInstructions() : undefined, onClusterClear: resetClusterData, isV3: product !== 'OpenShift Container Platform', isDisabled: isClusterIdUpdating, noClusterIdReasonExplanation: noClusterIdReasonExplanation }),
|
|
243
245
|
noClusterIdReasonExplanation !== 'v3-cluster' &&
|
|
244
246
|
(dontKnowSelected || noClusterIdReasonExplanation || noClusterIdReason) && (React.createElement(NoClusterIDReasonSelector, { noClusterIdReasonExplanation: noClusterIdReasonExplanation, noClusterIdReason: noClusterIdReason, onReasonInputBoxChanged: debounceFn, onReasonChange: onReasonChange, isInValid: isInVaidNoClusterIdReason, isCustomer: isCustomer, isDisabled: isReasonUpdating })),
|
|
245
247
|
React.createElement(LoadingIndicator, { show: isClusterIdUpdating, size: "xs" })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseReferenceNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseReferenceNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.tsx"],"names":[],"mappings":"AA4BA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,MAAM,eA6LxD"}
|
|
@@ -14,7 +14,7 @@ import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
|
|
|
14
14
|
import { NewInlineEdit, ToastNotification, ValueChangedIcon } from '@rh-support/components';
|
|
15
15
|
import { useCanEditCase } from '@rh-support/react-context';
|
|
16
16
|
import isEqual from 'lodash/isEqual';
|
|
17
|
-
import React, { useEffect, useState } from 'react';
|
|
17
|
+
import React, { useContext, useEffect, useState } from 'react';
|
|
18
18
|
import { Trans, useTranslation } from 'react-i18next';
|
|
19
19
|
import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
|
|
20
20
|
import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
|
|
@@ -22,6 +22,7 @@ import { CASE_REFERENCE_NUMBER_LIMIT } from '../../../../reducers/CaseConstNType
|
|
|
22
22
|
import { setCaseDetails, updateCaseDetails } from '../../../../reducers/CaseReducer';
|
|
23
23
|
import { CaseValuesToWatch } from '../../../shared/Constants';
|
|
24
24
|
import { getChangedValueTooltip } from '../../../shared/utils';
|
|
25
|
+
import { PDFContext } from '../../PDFContainer';
|
|
25
26
|
export default function CaseReferenceNumber(props) {
|
|
26
27
|
const { hideSaveCancel = true, inlineEditable = true } = props;
|
|
27
28
|
const { t } = useTranslation();
|
|
@@ -33,6 +34,7 @@ export default function CaseReferenceNumber(props) {
|
|
|
33
34
|
const caseDispatch = useCaseDispatch();
|
|
34
35
|
const [isUpdating, setIsUpdating] = useState(false);
|
|
35
36
|
const [referenceNumberState, setReferenceNumberState] = useState(referenceNumber);
|
|
37
|
+
const { isExportingPDF } = useContext(PDFContext);
|
|
36
38
|
// value changed logic to show a none local type change
|
|
37
39
|
const [localRefNumberChange, setLocalRefNumberChange] = useState(false);
|
|
38
40
|
const afterLocalChange = () => setLocalRefNumberChange(false);
|
|
@@ -103,8 +105,8 @@ export default function CaseReferenceNumber(props) {
|
|
|
103
105
|
React.createElement(Trans, null, "Personal reference number"),
|
|
104
106
|
React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localRefNumberChange, value: referenceNumber, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.altID) }),
|
|
105
107
|
' ',
|
|
106
|
-
React.createElement(Tooltip, { trigger: 'mouseenter focus', position: TooltipPosition.top, content: React.createElement(Trans, null, "Add your internal tracking ID to better identify and organize support issues.") },
|
|
107
|
-
React.createElement(InfoIcon, { className: "pf-u-ml-sm", "aria-label": "Case Alternate ID" }))), allowInlineEdit: inlineEditable, content: referenceNumber || t('No personal reference number to display.'), hideSaveCancel: hideSaveCancel, saveDisabled: saveDisabled, charCount: (referenceNumberState === null || referenceNumberState === void 0 ? void 0 : referenceNumberState.length) || 0, charTotal: CASE_REFERENCE_NUMBER_LIMIT, cancelToggleState: isCancelClicked, saveToggleState: isSaveClicked },
|
|
108
|
+
!isExportingPDF ? (React.createElement(Tooltip, { trigger: 'mouseenter focus', position: TooltipPosition.top, content: React.createElement(Trans, null, "Add your internal tracking ID to better identify and organize support issues.") },
|
|
109
|
+
React.createElement(InfoIcon, { className: "pf-u-ml-sm", "aria-label": "Case Alternate ID" }))) : ('')), allowInlineEdit: inlineEditable, content: referenceNumber || t('No personal reference number to display.'), hideSaveCancel: hideSaveCancel, saveDisabled: saveDisabled, charCount: (referenceNumberState === null || referenceNumberState === void 0 ? void 0 : referenceNumberState.length) || 0, charTotal: CASE_REFERENCE_NUMBER_LIMIT, cancelToggleState: isCancelClicked, saveToggleState: isSaveClicked, isExportingPDF: isExportingPDF },
|
|
108
110
|
React.createElement(TextInputGroup, null,
|
|
109
111
|
React.createElement(TextInput, { value: referenceNumberState, type: "text", className: "form-control", id: "case-details-reference-number", placeholder: t(`Enter the reference number used personally or within your company`), onChange: onReferenceNumberChange, "data-tracking-id": "case-details-reference-number", isDisabled: isUpdating, onKeyDown: handleKeyDown, validated: (referenceNumberState === null || referenceNumberState === void 0 ? void 0 : referenceNumberState.length) > CASE_REFERENCE_NUMBER_LIMIT
|
|
110
112
|
? ValidatedOptions.error
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductVersion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/ProductVersion.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProductVersion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/ProductVersion.tsx"],"names":[],"mappings":"AA6BA,UAAU,MAAM;IACZ,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACvC;AAYD,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,eAmRrC;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -20,6 +20,7 @@ import { Trans, useTranslation } from 'react-i18next';
|
|
|
20
20
|
import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
|
|
21
21
|
import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
|
|
22
22
|
import { getVersionsDetails, updateCaseDetails } from '../../../../reducers/CaseReducer';
|
|
23
|
+
import { PDFContext } from '../../PDFContainer';
|
|
23
24
|
const getVersions = (products, product) => {
|
|
24
25
|
const allProductsIndex = findIndex(products, (p) => p.product === product);
|
|
25
26
|
return allProductsIndex !== -1 ? products[allProductsIndex].versions || [] : [];
|
|
@@ -56,6 +57,7 @@ function ProductNVersion(props) {
|
|
|
56
57
|
const [selectedProductLocal, setSelectedProductLocal] = useState(product);
|
|
57
58
|
const [selectedVersionLocal, setSelectedVersionLocal] = useState(version);
|
|
58
59
|
const canEditCase = useCanEditCase();
|
|
60
|
+
const { isExportingPDF } = useContext(PDFContext);
|
|
59
61
|
useEffect(() => {
|
|
60
62
|
setVersions(productVersions);
|
|
61
63
|
if ((productVersions === null || productVersions === void 0 ? void 0 : productVersions.length) && !selectedVersionLocal && (productVersions === null || productVersions === void 0 ? void 0 : productVersions.length) < 2)
|
|
@@ -215,7 +217,7 @@ function ProductNVersion(props) {
|
|
|
215
217
|
selectedVersion: selectedVersionLocal,
|
|
216
218
|
isTopProduct: checkIsTopProduct(allProducts.data.productsResult, product),
|
|
217
219
|
isEntitledProduct: true,
|
|
218
|
-
}, { labelKey: 'product' }), list: toOptions(filter(allProducts.data.productsResult, (p) => p.isEntitledProduct), { labelKey: 'product' }), title: t(`Select a product`), disabled: isProductUpdating || (allProducts.isFetching && !allProducts.isError), isInValid: isProductInvalid, onChange: onProductChange, isLoadingList: isProductUpdating, "data-tracking-id": "case-details-product-selector", onOuterClick: onOuterClick, searchable: true, onClearSelection: onProductClear })),
|
|
220
|
+
}, { labelKey: 'product' }), list: toOptions(filter(allProducts.data.productsResult, (p) => p.isEntitledProduct), { labelKey: 'product' }), title: t(`Select a product`), disabled: isProductUpdating || (allProducts.isFetching && !allProducts.isError), isInValid: isProductInvalid, onChange: onProductChange, isLoadingList: isProductUpdating, "data-tracking-id": "case-details-product-selector", onOuterClick: onOuterClick, searchable: true, onClearSelection: onProductClear, isExportingPDF: isExportingPDF })),
|
|
219
221
|
React.createElement("div", { className: "version-selector-wrapper" },
|
|
220
222
|
React.createElement("label", { htmlFor: "version-dropdown" },
|
|
221
223
|
React.createElement(Trans, null, "Version")),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Summary.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/Summary.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Summary.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/Summary.tsx"],"names":[],"mappings":"AAwBA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAQD,iBAAS,OAAO,CAAC,KAAK,EAAE,MAAM,eA2L7B;kBA3LQ,OAAO;;;AA8LhB,eAAe,OAAO,CAAC"}
|
|
@@ -14,12 +14,13 @@ import { NewInlineEdit, ToastNotification, ValueChangedIcon } from '@rh-support/
|
|
|
14
14
|
import { useCanEditCase } from '@rh-support/react-context';
|
|
15
15
|
import isEmpty from 'lodash/isEmpty';
|
|
16
16
|
import isEqual from 'lodash/isEqual';
|
|
17
|
-
import React, { useEffect, useState } from 'react';
|
|
17
|
+
import React, { useContext, useEffect, useState } from 'react';
|
|
18
18
|
import { Trans, useTranslation } from 'react-i18next';
|
|
19
19
|
import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
|
|
20
20
|
import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
|
|
21
21
|
import { SUMMARY_LENGTH_LIMIT } from '../../../../reducers/CaseConstNTypes';
|
|
22
22
|
import { setCaseDetails, updateCaseDetails } from '../../../../reducers/CaseReducer';
|
|
23
|
+
import { PDFContext } from '../../PDFContainer';
|
|
23
24
|
const defaultProps = {
|
|
24
25
|
inlineEditable: true,
|
|
25
26
|
hideLabel: false,
|
|
@@ -33,6 +34,7 @@ function Summary(props) {
|
|
|
33
34
|
caseNumber: state.caseDetails.caseNumber,
|
|
34
35
|
}), isEqual);
|
|
35
36
|
const caseDispatch = useCaseDispatch();
|
|
37
|
+
const { isExportingPDF } = useContext(PDFContext);
|
|
36
38
|
const [summaryState, setSummaryState] = useState(summary);
|
|
37
39
|
const [isSummaryUpdating, setIsSummaryUpdating] = useState(false);
|
|
38
40
|
const canEditCase = useCanEditCase();
|
|
@@ -124,7 +126,7 @@ function Summary(props) {
|
|
|
124
126
|
React.createElement(NewInlineEdit, { labelProps: { htmlFor: 'case-details-summary' }, labelContent: React.createElement(React.Fragment, null,
|
|
125
127
|
React.createElement(Trans, null, "Issue summary"),
|
|
126
128
|
React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localSummaryChange, value: summary, getTooltipContent: getSummaryChangedTT }),
|
|
127
|
-
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")), allowInlineEdit: props.inlineEditable, content: summary ? summary : t('No summary to display.'), saveDisabled: saveDisabled, hideLabel: props.hideLabel, hideSaveCancel: props.hideSaveCancel, charCount: (summaryState === null || summaryState === void 0 ? void 0 : summaryState.length) || 0, charTotal: SUMMARY_LENGTH_LIMIT, cancelToggleState: isCancelClicked, saveToggleState: isSaveClicked },
|
|
129
|
+
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")), allowInlineEdit: props.inlineEditable, content: summary ? summary : t('No summary to display.'), saveDisabled: saveDisabled, hideLabel: props.hideLabel, hideSaveCancel: props.hideSaveCancel, charCount: (summaryState === null || summaryState === void 0 ? void 0 : summaryState.length) || 0, charTotal: SUMMARY_LENGTH_LIMIT, cancelToggleState: isCancelClicked, saveToggleState: isSaveClicked, isExportingPDF: isExportingPDF },
|
|
128
130
|
React.createElement(TextInputGroup, null,
|
|
129
131
|
React.createElement(TextInput, { type: "text", id: "case-details-summary", className: 'form-control', "aria-required": true, required: true, name: "case-details-summary", value: summaryState, onChange: onSummaryChange, isDisabled: isSummaryUpdating, "data-tracking-id": "case-details-summary", onKeyDown: handleKeyDown, validated: (summaryState === null || summaryState === void 0 ? void 0 : summaryState.length) > SUMMARY_LENGTH_LIMIT || isSummaryEmpty
|
|
130
132
|
? ValidatedOptions.error
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseComments.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AA6BvE,OAAO,KAA+B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseComments.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AA6BvE,OAAO,KAA+B,MAAM,OAAO,CAAC;AAQpD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAClF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,kBAAkB,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAChH;AAED,QAAA,MAAM,YAAY,4EAmThB,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -24,6 +24,7 @@ import isEmpty from 'lodash/isEmpty';
|
|
|
24
24
|
import React, { useContext, useState } from 'react';
|
|
25
25
|
import { Trans, useTranslation } from 'react-i18next';
|
|
26
26
|
import { DiscussionType } from '../../../../reducers/CaseDiscussionTabReducer';
|
|
27
|
+
import { PDFContext } from '../../PDFContainer';
|
|
27
28
|
import { DiscussionItemLink } from './DiscussionItemLink';
|
|
28
29
|
import { JumpAndCopyLink } from './JumpAndCopyLink';
|
|
29
30
|
const CaseComments = React.forwardRef((props, ref) => {
|
|
@@ -36,6 +37,7 @@ const CaseComments = React.forwardRef((props, ref) => {
|
|
|
36
37
|
props.comment.isPublic &&
|
|
37
38
|
props.comment.createdBy !== 'Automated Support Assistant';
|
|
38
39
|
const [isFeedbackUpdating, setIsFeedbackUpdating] = useState(false);
|
|
40
|
+
const { isExportingPDF } = useContext(PDFContext);
|
|
39
41
|
const commentReply = (comment) => () => {
|
|
40
42
|
props.onReply(comment.commentBody, comment.createdBy, comment.isPublic);
|
|
41
43
|
};
|
|
@@ -202,7 +204,7 @@ const CaseComments = React.forwardRef((props, ref) => {
|
|
|
202
204
|
React.createElement("span", { className: "pull-right pf-l-flex pf-m-align-items-center" },
|
|
203
205
|
props.showJumpToComment && (React.createElement(DiscussionItemLink, { onClick: onJumpToComment(props.comment.id), discussionType: DiscussionType.COMMENT, itemId: props.comment.id, caseNumber: caseNumber, isCopyLink: false },
|
|
204
206
|
React.createElement(Trans, null, "Jump to comment"))),
|
|
205
|
-
React.createElement("button", { onClick: commentReply(props.comment), className:
|
|
207
|
+
React.createElement("button", { onClick: commentReply(props.comment), className: `btn btn-app btn-link ${isExportingPDF ? 'hide-in-pdf' : ''}`, "data-tracking-id": "case-comment-reply" },
|
|
206
208
|
React.createElement(Trans, null, "Reply")),
|
|
207
209
|
React.createElement(JumpAndCopyLink, { caseNumber: caseNumber, cardId: props.comment.id, discussionType: DiscussionType.COMMENT })))));
|
|
208
210
|
});
|
|
@@ -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;AAmB1G,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,
|
|
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;AAmB1G,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,eAygBnD"}
|
|
@@ -312,7 +312,7 @@ export default function CaseDiscussion(props) {
|
|
|
312
312
|
!caseFeedbacksHydra.isFetching &&
|
|
313
313
|
!caseExternalTrackersUpdate.isFetching &&
|
|
314
314
|
allDiscussions.length !== 0 && (React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading comments. Try refreshing.') } },
|
|
315
|
-
React.createElement("div", { className:
|
|
315
|
+
React.createElement("div", { className: `pfe-l-grid pfe-m-all-6-col pfe-m-gutters push-bottom ${isExportingPDF ? 'hide-in-pdf' : ''}` },
|
|
316
316
|
React.createElement("div", { className: "pfe-m-12-col" }, allDiscussions.length > 20 && (React.createElement(CommentSearch, { caseDiscussions: computeFilteredComments || [], onCommentSearch: onCaseCommentSearch, isCommentSearchCleared: isCommentSearchCleared }))),
|
|
317
317
|
React.createElement("span", { className: "push-top-narrow" },
|
|
318
318
|
React.createElement(MultiSelectDropDownList, { placeholder: getDropdownBtnPlaceholder(t('Select a filter'), list.filter((i) => i.isSelected).map((i) => i.filterLabel), ' ', list.length, t('All comments')), "data-tracking-id": "discussions-filter-comments-dropdown", id: "case-list-comments-dropdown", label: t('Filter by'), title: t('Filter by'), onChange: onFilterChange, selectedItems: toOptions(list.filter((item) => item.isSelected), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostComment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment.tsx"],"names":[],"mappings":"AAsCA,OAAO,EAAkB,WAAW,EAAE,MAAM,+CAA+C,CAAC;
|
|
1
|
+
{"version":3,"file":"PostComment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment.tsx"],"names":[],"mappings":"AAsCA,OAAO,EAAkB,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAsB5F,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,WAAW,EAAE,CAAC;CACjC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,eA8fxC"}
|