@rh-support/troubleshoot 2.1.20 → 2.2.0
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/ManagedAccountsDropdown.js +1 -1
- package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/OwnerSelector.js +60 -20
- package/lib/esm/components/AccountInfo/css/accountSelector.css +4 -0
- 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 +73 -42
- 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/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseInformation.js +3 -3
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +24 -25
- package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.js +1 -5
- 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/CaseManagement.js +4 -4
- package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/Cep.js +5 -3
- 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/IdeaInformation/IdeaInformtion.d.ts.map +1 -1
- package/lib/esm/components/IdeaInformation/IdeaInformtion.js +4 -4
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +2 -2
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +1 -1
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +1 -1
- package/lib/esm/components/ProductSelector/ProductSelector.js +2 -2
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +6 -8
- package/lib/esm/components/Recommendations/AsideResults.js +1 -1
- package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
- package/lib/esm/components/SubmitCase/SubmitCase.js +9 -7
- package/lib/esm/components/Suggestions/Suggestions.js +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts.map +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +13 -6
- package/lib/esm/components/shared/fileUpload/FileLister.js +1 -1
- package/lib/esm/components/shared/fileUpload/UploadButton.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/UploadButton.js +2 -1
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +17 -3
- package/lib/esm/components/shared/fileUpload/css/fileSelector.css +1 -1
- package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelector.d.ts +2 -1
- package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelector.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelector.js +28 -10
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +24 -6
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +2 -0
- package/lib/esm/constants/caseDetailsConstants.d.ts +0 -1
- package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
- package/lib/esm/constants/caseDetailsConstants.js +0 -1
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +4 -2
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +12 -8
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +2 -0
- package/lib/esm/scss/_main.scss +1 -221
- package/lib/esm/scss/_pf4-overrides.scss +50 -0
- package/package.json +8 -8
|
@@ -31,7 +31,7 @@ function ManagedAccountsDropdown(props) {
|
|
|
31
31
|
React.createElement(InfoCircleIcon, null),
|
|
32
32
|
" ",
|
|
33
33
|
React.createElement(Trans, null, "Subscription abuse"))))), children: (React.createElement(React.Fragment, null, account.subscriptionAbuse ? (React.createElement("span", { className: "form-instructions form-invalid" }, getLabelForAccountOption(account))) : (getLabelForAccountOption(account)))) }, account))) || [];
|
|
34
|
-
return (React.createElement(Dropdown, { className: `
|
|
34
|
+
return (React.createElement(Dropdown, { className: `margin-top ${props.className}`, id: props.id, placeholder: "Select a managed account", list: toOptions(managedAccountsOptions, {
|
|
35
35
|
childrenKey: 'children',
|
|
36
36
|
actionItemKey: 'actionItem',
|
|
37
37
|
}), selectedItem: selectedItem, title: `Select a managed account`, onChange: props.onManagedAccountChange, disabled: props.disabled || managedAccountsOptions.length === 0 }));
|
|
@@ -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,eA6TnC;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);
|
|
@@ -50,22 +52,41 @@ function OwnerSelector(props) {
|
|
|
50
52
|
const canEditCase = useCanEditCase();
|
|
51
53
|
const setContactPhoneNumber = (sso) => __awaiter(this, void 0, void 0, function* () {
|
|
52
54
|
if (sso === loggedInUser.data.ssoUsername) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
if (loggedInUser.data.supportPhoneAreaCodePrefixLineNumber) {
|
|
56
|
+
setCaseDetails(caseDispatch, {
|
|
57
|
+
phoneAreaCodePrefixLineNumber: loggedInUser.data.supportPhoneAreaCodePrefixLineNumber,
|
|
58
|
+
phoneCountryCode: loggedInUser.data.supportPhoneCountryCode,
|
|
59
|
+
suppliedPhoneNumberVerified: 'True',
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
setCaseDetails(caseDispatch, {
|
|
64
|
+
phone: loggedInUser.data.phone,
|
|
65
|
+
suppliedPhoneNumberVerified: 'True',
|
|
66
|
+
});
|
|
67
|
+
}
|
|
57
68
|
}
|
|
58
69
|
else {
|
|
59
70
|
try {
|
|
60
71
|
const selectedContact = yield contacts.getSFDCContactBySso(sso);
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
72
|
+
if (selectedContact.supportPhoneAreaCodePrefixLineNumber) {
|
|
73
|
+
setCaseDetails(caseDispatch, {
|
|
74
|
+
phoneAreaCodePrefixLineNumber: selectedContact.supportPhoneAreaCodePrefixLineNumber,
|
|
75
|
+
phoneCountryCode: selectedContact.supportPhoneCountryCode,
|
|
76
|
+
suppliedPhoneNumberVerified: 'True',
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
setCaseDetails(caseDispatch, {
|
|
81
|
+
phone: selectedContact.phone,
|
|
82
|
+
suppliedPhoneNumberVerified: 'Deferred',
|
|
83
|
+
});
|
|
84
|
+
}
|
|
65
85
|
}
|
|
66
86
|
catch (e) {
|
|
67
87
|
setCaseDetails(caseDispatch, {
|
|
68
|
-
|
|
88
|
+
phoneAreaCodePrefixLineNumber: '',
|
|
89
|
+
phoneCountryCode: '',
|
|
69
90
|
suppliedPhoneNumberVerified: 'Deferred',
|
|
70
91
|
});
|
|
71
92
|
}
|
|
@@ -74,22 +95,41 @@ function OwnerSelector(props) {
|
|
|
74
95
|
const updateContactPhoneNumber = (sso) => __awaiter(this, void 0, void 0, function* () {
|
|
75
96
|
try {
|
|
76
97
|
if (sso === loggedInUser.data.ssoUsername) {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
98
|
+
if (loggedInUser.data.supportPhoneAreaCodePrefixLineNumber) {
|
|
99
|
+
updateCaseDetails(caseDispatch, caseNumber, {
|
|
100
|
+
phoneAreaCodePrefixLineNumber: loggedInUser.data.supportPhoneAreaCodePrefixLineNumber,
|
|
101
|
+
phoneCountryCode: loggedInUser.data.supportPhoneCountryCode,
|
|
102
|
+
suppliedPhoneNumberVerified: 'True',
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
yield updateCaseDetails(caseDispatch, caseNumber, {
|
|
107
|
+
phone: loggedInUser.data.phone,
|
|
108
|
+
suppliedPhoneNumberVerified: 'Deferred',
|
|
109
|
+
});
|
|
110
|
+
}
|
|
81
111
|
}
|
|
82
112
|
else {
|
|
83
113
|
try {
|
|
84
114
|
const selectedContact = yield contacts.getSFDCContactBySso(sso);
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
115
|
+
if (selectedContact.supportPhoneAreaCodePrefixLineNumber) {
|
|
116
|
+
updateCaseDetails(caseDispatch, caseNumber, {
|
|
117
|
+
phoneAreaCodePrefixLineNumber: selectedContact.supportPhoneAreaCodePrefixLineNumber,
|
|
118
|
+
phoneCountryCode: selectedContact.supportPhoneCountryCode,
|
|
119
|
+
suppliedPhoneNumberVerified: 'True',
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
yield updateCaseDetails(caseDispatch, caseNumber, {
|
|
124
|
+
phone: selectedContact.phone,
|
|
125
|
+
suppliedPhoneNumberVerified: 'Deferred',
|
|
126
|
+
});
|
|
127
|
+
}
|
|
89
128
|
}
|
|
90
129
|
catch (e) {
|
|
91
130
|
yield updateCaseDetails(caseDispatch, caseNumber, {
|
|
92
|
-
|
|
131
|
+
phoneAreaCodePrefixLineNumber: '',
|
|
132
|
+
phoneCountryCode: '',
|
|
93
133
|
suppliedPhoneNumberVerified: 'Deferred',
|
|
94
134
|
});
|
|
95
135
|
}
|
|
@@ -207,11 +247,11 @@ function OwnerSelector(props) {
|
|
|
207
247
|
const showUsersWithSelectedGroupAccess = caseNumber &&
|
|
208
248
|
(selectedCaseGroupUsers.isFetching ||
|
|
209
249
|
(!selectedCaseGroupUsers.isFetching && (selectedCaseGroupUsers.data || []).length > 0));
|
|
210
|
-
return (React.createElement("div", { className: "form-group" },
|
|
250
|
+
return (React.createElement("div", { className: "form-group get-support-owner-wapper" },
|
|
211
251
|
React.createElement("label", { htmlFor: "get-support-owner" },
|
|
212
252
|
React.createElement(Trans, null, "Owner"),
|
|
213
253
|
React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, comparator: ownerComparator, isLocalChange: localOwnerChange, value: selectedOwner.data, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.owner, (v) => v.fullNameCustom) }),
|
|
214
|
-
React.createElement("span", { className:
|
|
254
|
+
React.createElement("span", { className: `form-required ${isExportingPDF ? 'hide-in-pdf' : ''}`, "aria-hidden": true }, "*")),
|
|
215
255
|
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
256
|
}
|
|
217
257
|
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,gBAuKrC"}
|
|
@@ -7,23 +7,25 @@ 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 {
|
|
10
|
+
import { contacts } from '@cee-eng/hydrajs';
|
|
11
|
+
import { InputGroupText, InputGroupTextVariant, ValidatedOptions } from '@patternfly/react-core';
|
|
11
12
|
import CheckIcon from '@patternfly/react-icons/dist/js/icons/check-icon';
|
|
12
13
|
import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
|
|
13
|
-
import {
|
|
14
|
+
import { PhoneInput, ToastNotification } from '@rh-support/components';
|
|
14
15
|
import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
|
|
15
16
|
import isEqual from 'lodash/isEqual';
|
|
16
|
-
import React, { useContext,
|
|
17
|
+
import React, { useContext, useState } from 'react';
|
|
17
18
|
import { Trans, useTranslation } from 'react-i18next';
|
|
18
|
-
import { PHONE_INSTRUCTION } from '../../../../constants/caseDetailsConstants';
|
|
19
19
|
import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
|
|
20
20
|
import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
|
|
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
|
-
const {
|
|
26
|
-
|
|
26
|
+
const { phoneCountryCode, phoneAreaCodePrefixLineNumber, caseNumber, contactSSOName, suppliedPhoneNumberVerified, isCaseOwnerUpdating, } = useCaseSelector((state) => ({
|
|
27
|
+
phoneCountryCode: state.caseDetails.phoneCountryCode || '',
|
|
28
|
+
phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber || '',
|
|
27
29
|
caseNumber: state.caseDetails.caseNumber,
|
|
28
30
|
contactSSOName: state.caseDetails.contactSSOName,
|
|
29
31
|
suppliedPhoneNumberVerified: state.caseDetails.suppliedPhoneNumberVerified,
|
|
@@ -32,65 +34,94 @@ export function CaseContactPhoneNumber() {
|
|
|
32
34
|
const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
|
|
33
35
|
const canEditCase = useCanEditCase();
|
|
34
36
|
const [isCasePhoneUpdating, setCasePhoneUpdating] = useState(false);
|
|
35
|
-
const [
|
|
37
|
+
const [localFullPhoneState, setLocalFullPhoneState] = useState(phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber);
|
|
38
|
+
const [localCountryCodeState, setLocalCountryCodeState] = useState(phoneCountryCode);
|
|
36
39
|
const caseDispatch = useCaseDispatch();
|
|
37
40
|
const caseUpdateError = useCaseUpdateErrorMessage();
|
|
38
41
|
const { t } = useTranslation();
|
|
42
|
+
const { isExportingPDF } = useContext(PDFContext);
|
|
39
43
|
// To handle phone change
|
|
40
|
-
const onPhoneChange = (
|
|
44
|
+
const onPhoneChange = (fullPhone) => __awaiter(this, void 0, void 0, function* () {
|
|
41
45
|
if (canEditCase.alert())
|
|
42
46
|
return;
|
|
43
|
-
|
|
47
|
+
setLocalFullPhoneState(fullPhone);
|
|
44
48
|
});
|
|
49
|
+
const onCountryCodeChange = (countryCode) => {
|
|
50
|
+
if (canEditCase.alert())
|
|
51
|
+
return;
|
|
52
|
+
setLocalCountryCodeState(countryCode);
|
|
53
|
+
};
|
|
45
54
|
const onSave = () => __awaiter(this, void 0, void 0, function* () {
|
|
46
55
|
setCasePhoneUpdating(true);
|
|
56
|
+
const phoneLine = localFullPhoneState
|
|
57
|
+
.substring(localCountryCodeState.length, localFullPhoneState.length)
|
|
58
|
+
.trim();
|
|
59
|
+
const countryCode = localCountryCodeState.trim();
|
|
47
60
|
try {
|
|
48
|
-
yield updateCaseDetails(caseDispatch, caseNumber, {
|
|
61
|
+
yield updateCaseDetails(caseDispatch, caseNumber, {
|
|
62
|
+
phoneCountryCode: countryCode,
|
|
63
|
+
phoneAreaCodePrefixLineNumber: phoneLine,
|
|
64
|
+
});
|
|
49
65
|
setCasePhoneUpdating(false);
|
|
50
66
|
ToastNotification.addSuccessMessage(t(`Phone number has been successfully updated`));
|
|
67
|
+
try {
|
|
68
|
+
contacts.updateContactBySSO(loggedInUser.data.ssoUsername, {
|
|
69
|
+
supportPhoneCountryCode: countryCode,
|
|
70
|
+
supportPhoneAreaCodePrefixLineNumber: phoneLine,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
catch (e) {
|
|
74
|
+
// silently fails
|
|
75
|
+
}
|
|
51
76
|
}
|
|
52
77
|
catch (e) {
|
|
53
78
|
setCasePhoneUpdating(false);
|
|
54
79
|
caseUpdateError.showError(e, t(`Phone number failed to update`));
|
|
55
80
|
}
|
|
56
81
|
});
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
82
|
+
const onClear = () => __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
setLocalFullPhoneState('');
|
|
84
|
+
setLocalCountryCodeState('');
|
|
85
|
+
setCasePhoneUpdating(true);
|
|
86
|
+
try {
|
|
87
|
+
yield updateCaseDetails(caseDispatch, caseNumber, {
|
|
88
|
+
phoneCountryCode: '',
|
|
89
|
+
phoneAreaCodePrefixLineNumber: '',
|
|
90
|
+
});
|
|
91
|
+
setCasePhoneUpdating(false);
|
|
92
|
+
ToastNotification.addSuccessMessage(t(`Phone number has been successfully updated`));
|
|
93
|
+
try {
|
|
94
|
+
contacts.updateContactBySSO(loggedInUser.data.ssoUsername, {
|
|
95
|
+
clearPhoneNumber: true,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
catch (e) {
|
|
99
|
+
// silently fails
|
|
100
|
+
}
|
|
65
101
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
102
|
+
catch (e) {
|
|
103
|
+
setCasePhoneUpdating(false);
|
|
104
|
+
caseUpdateError.showError(e, t(`Phone number failed to update`));
|
|
69
105
|
}
|
|
70
106
|
});
|
|
71
|
-
useEffect(() => {
|
|
72
|
-
setLocalPhoneState(phone);
|
|
73
|
-
}, [phone]);
|
|
74
107
|
const maxLengthErrorMessage = t('Phone number cannot be more than {{limit}} characters.', {
|
|
75
108
|
limit: PHONE_LIMIT,
|
|
76
109
|
});
|
|
77
110
|
const isPhoneNeedsReview = contactSSOName === loggedInUser.data.ssoUsername && suppliedPhoneNumberVerified === 'Deferred';
|
|
78
|
-
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))))));
|
|
111
|
+
return (React.createElement("div", { className: "form-group pf-u-pb-lg", style: { minWidth: '200px' } },
|
|
112
|
+
React.createElement("h3", { className: `subheading subheading-sm ${isExportingPDF ? 'expand-input' : ''}` },
|
|
113
|
+
React.createElement(Trans, null, "Case owner's phone number"),
|
|
114
|
+
!isExportingPDF ? ContactPhoneNumberPopOver() : ''),
|
|
115
|
+
React.createElement(InputGroupText, { variant: InputGroupTextVariant.plain },
|
|
116
|
+
React.createElement(PhoneInput, { phoneValue: localFullPhoneState, onPhoneValueChange: onPhoneChange, onCountryCodeChange: onCountryCodeChange, validations: (localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.length) > PHONE_LIMIT
|
|
117
|
+
? ValidatedOptions.error
|
|
118
|
+
: isPhoneNeedsReview
|
|
119
|
+
? ValidatedOptions.warning
|
|
120
|
+
: ValidatedOptions.default, isDisabled: isCasePhoneUpdating || isCaseOwnerUpdating, isLoading: isCasePhoneUpdating, "data-tracking-id": "case-details-page-supplied-phone" }),
|
|
121
|
+
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: (localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.length) > PHONE_LIMIT ||
|
|
122
|
+
localFullPhoneState === phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber, style: { display: isExportingPDF ? 'none' : '' } },
|
|
123
|
+
React.createElement(CheckIcon, null)),
|
|
124
|
+
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' : '' } },
|
|
125
|
+
React.createElement(TimesIcon, { color: "#6A6E73" }))),
|
|
126
|
+
(localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.length) > PHONE_LIMIT && (React.createElement("p", { className: "form-instructions form-invalid" }, maxLengthErrorMessage))));
|
|
96
127
|
}
|
|
@@ -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"}
|