@rh-support/troubleshoot 1.0.41 → 1.0.42-beta.31
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/CaseEditView/CaseOverview/CaseType.js +2 -2
- package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +3 -6
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseAlternateId.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseAlternateId.js +9 -9
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +16 -6
- package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseInformation.js +2 -4
- package/lib/esm/components/CaseInformation/CaseType.js +3 -3
- package/lib/esm/components/CaseInformation/Description.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Description.js +1 -1
- package/lib/esm/components/CaseInformation/OpenCaseIssue.js +2 -2
- package/lib/esm/components/CaseInformation/Severity.d.ts +1 -2
- package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Severity.js +14 -8
- package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.js +27 -23
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.d.ts +1 -0
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +37 -17
- package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseManagement.js +4 -42
- package/lib/esm/components/CaseManagement/OpenAlternateID.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenAlternateID.js +6 -6
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +5 -0
- package/lib/esm/components/ImproveCase/Hostname.d.ts.map +1 -1
- package/lib/esm/components/ImproveCase/Hostname.js +9 -5
- package/lib/esm/components/ImproveCase/KtQuestions.d.ts.map +1 -1
- package/lib/esm/components/ImproveCase/KtQuestions.js +3 -3
- package/lib/esm/components/Issue/Issue.js +1 -1
- package/lib/esm/components/OpenCase/CaseTypeIcons/BugIcon.d.ts +8 -0
- package/lib/esm/components/OpenCase/CaseTypeIcons/BugIcon.d.ts.map +1 -0
- package/lib/esm/components/OpenCase/CaseTypeIcons/BugIcon.js +7 -0
- package/lib/esm/components/OpenCase/CaseTypeIcons/CertificationIcon.d.ts +8 -0
- package/lib/esm/components/OpenCase/CaseTypeIcons/CertificationIcon.d.ts.map +1 -0
- package/lib/esm/components/OpenCase/CaseTypeIcons/CertificationIcon.js +10 -0
- package/lib/esm/components/OpenCase/CaseTypeIcons/CustomerServiceIcon.d.ts +8 -0
- package/lib/esm/components/OpenCase/CaseTypeIcons/CustomerServiceIcon.d.ts.map +1 -0
- package/lib/esm/components/OpenCase/CaseTypeIcons/CustomerServiceIcon.js +9 -0
- package/lib/esm/components/OpenCase/CaseTypeIcons/DocumentationIcon.d.ts +8 -0
- package/lib/esm/components/OpenCase/CaseTypeIcons/DocumentationIcon.d.ts.map +1 -0
- package/lib/esm/components/OpenCase/CaseTypeIcons/DocumentationIcon.js +7 -0
- package/lib/esm/components/OpenCase/CaseTypeIcons/GearIcon.d.ts +8 -0
- package/lib/esm/components/OpenCase/CaseTypeIcons/GearIcon.d.ts.map +1 -0
- package/lib/esm/components/OpenCase/CaseTypeIcons/GearIcon.js +8 -0
- package/lib/esm/components/OpenCase/CaseTypeIcons/IdeaIcon.d.ts +8 -0
- package/lib/esm/components/OpenCase/CaseTypeIcons/IdeaIcon.d.ts.map +1 -0
- package/lib/esm/components/OpenCase/CaseTypeIcons/IdeaIcon.js +8 -0
- package/lib/esm/components/OpenCase/CaseTypeIcons/RcaIcon.d.ts +8 -0
- package/lib/esm/components/OpenCase/CaseTypeIcons/RcaIcon.d.ts.map +1 -0
- package/lib/esm/components/OpenCase/CaseTypeIcons/RcaIcon.js +8 -0
- package/lib/esm/components/OpenCase/CaseTypeIcons/index.d.ts +8 -0
- package/lib/esm/components/OpenCase/CaseTypeIcons/index.d.ts.map +1 -0
- package/lib/esm/components/OpenCase/CaseTypeIcons/index.js +7 -0
- package/lib/esm/components/OpenCase/OpenCase.js +2 -2
- package/lib/esm/components/OpenCase/SupportTypeIcons/BugIcon.d.ts +8 -0
- package/lib/esm/components/OpenCase/SupportTypeIcons/BugIcon.d.ts.map +1 -0
- package/lib/esm/components/OpenCase/SupportTypeIcons/BugIcon.js +7 -0
- package/lib/esm/components/OpenCase/SupportTypeIcons/CertificationIcon.d.ts +8 -0
- package/lib/esm/components/OpenCase/SupportTypeIcons/CertificationIcon.d.ts.map +1 -0
- package/lib/esm/components/OpenCase/SupportTypeIcons/CertificationIcon.js +10 -0
- package/lib/esm/components/OpenCase/SupportTypeIcons/CustomerServiceIcon.d.ts +8 -0
- package/lib/esm/components/OpenCase/SupportTypeIcons/CustomerServiceIcon.d.ts.map +1 -0
- package/lib/esm/components/OpenCase/SupportTypeIcons/CustomerServiceIcon.js +9 -0
- package/lib/esm/components/OpenCase/SupportTypeIcons/DocumentationIcon.d.ts +8 -0
- package/lib/esm/components/OpenCase/SupportTypeIcons/DocumentationIcon.d.ts.map +1 -0
- package/lib/esm/components/OpenCase/SupportTypeIcons/DocumentationIcon.js +7 -0
- package/lib/esm/components/OpenCase/SupportTypeIcons/GearIcon.d.ts +8 -0
- package/lib/esm/components/OpenCase/SupportTypeIcons/GearIcon.d.ts.map +1 -0
- package/lib/esm/components/OpenCase/SupportTypeIcons/GearIcon.js +8 -0
- package/lib/esm/components/OpenCase/SupportTypeIcons/IdeaIcon.d.ts +8 -0
- package/lib/esm/components/OpenCase/SupportTypeIcons/IdeaIcon.d.ts.map +1 -0
- package/lib/esm/components/OpenCase/SupportTypeIcons/IdeaIcon.js +8 -0
- package/lib/esm/components/OpenCase/SupportTypeIcons/RcaIcon.d.ts +8 -0
- package/lib/esm/components/OpenCase/SupportTypeIcons/RcaIcon.d.ts.map +1 -0
- package/lib/esm/components/OpenCase/SupportTypeIcons/RcaIcon.js +8 -0
- package/lib/esm/components/OpenCase/SupportTypeIcons/index.d.ts +8 -0
- package/lib/esm/components/OpenCase/SupportTypeIcons/index.d.ts.map +1 -0
- package/lib/esm/components/OpenCase/SupportTypeIcons/index.js +7 -0
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts +2 -0
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -0
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +134 -0
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +3 -0
- package/lib/esm/components/ProductSelector/NewProductSelectSelector.d.ts +13 -0
- package/lib/esm/components/ProductSelector/NewProductSelectSelector.d.ts.map +1 -0
- package/lib/esm/components/ProductSelector/NewProductSelectSelector.js +76 -0
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts +10 -0
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -0
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +57 -0
- package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductSelector.js +6 -20
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +8 -73
- package/lib/esm/components/ProductSelector/TopProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AsideResults.js +3 -2
- package/lib/esm/components/Recommendations/InsightsResults.d.ts +1 -0
- package/lib/esm/components/Recommendations/InsightsResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/InsightsResults.js +5 -1
- package/lib/esm/components/Recommendations/Recommendations.d.ts +5 -1
- package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/Recommendations.js +20 -18
- package/lib/esm/components/Recommendations/RulesModal.d.ts +1 -0
- package/lib/esm/components/Recommendations/RulesModal.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/RulesModal.js +11 -1
- package/lib/esm/components/Review/Review.js +2 -2
- package/lib/esm/components/SessionRestore/RestoreLastSessionModal.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/RestoreLastSessionModal.js +6 -1
- package/lib/esm/components/Suggestions/Suggestions.d.ts.map +1 -1
- package/lib/esm/components/Suggestions/Suggestions.js +5 -3
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts +14 -0
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts.map +1 -0
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +59 -0
- package/lib/esm/components/shared/Constants.d.ts +2 -2
- package/lib/esm/components/shared/Constants.d.ts.map +1 -1
- package/lib/esm/components/shared/Constants.js +2 -2
- package/lib/esm/components/shared/fileUpload/FileLister.d.ts +1 -1
- package/lib/esm/components/shared/fileUpload/FileLister.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/FileLister.js +5 -2
- package/lib/esm/components/shared/fileUpload/FileUploader.js +1 -1
- package/lib/esm/components/shared/fileUpload/css/fileSelector.css +1 -27
- package/lib/esm/components/shared/fileUpload/index.d.ts +1 -1
- package/lib/esm/components/shared/fileUpload/index.js +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/{AttachemntReducer.d.ts → AttachmentReducer.d.ts} +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/{AttachemntReducer.d.ts.map → AttachmentReducer.d.ts.map} +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/{AttachemntReducer.js → AttachmentReducer.js} +0 -0
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducerContext.d.ts +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducerContext.js +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/FileStatusHelper.d.ts +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/FileStatusHelper.js +1 -1
- package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts +1 -1
- package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/useFileUploader.js +2 -4
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +16 -15
- package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardAside.js +15 -4
- package/lib/esm/components/wizardLayout/WizardMain.js +19 -19
- package/lib/esm/components/wizardLayout/WizardNavigation.js +7 -7
- package/lib/esm/enums/pageTitle.d.ts +1 -1
- package/lib/esm/enums/pageTitle.js +1 -1
- package/lib/esm/reducers/CaseConstNTypes.d.ts +15 -4
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +15 -3
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +2 -1
- package/lib/esm/reducers/RouteConstNTypes.d.ts +6 -5
- package/lib/esm/reducers/RouteConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/RouteConstNTypes.js +23 -16
- package/lib/esm/reducers/RouteReducer.d.ts +3 -1
- package/lib/esm/reducers/RouteReducer.d.ts.map +1 -1
- package/lib/esm/reducers/RouteReducer.js +32 -33
- package/lib/esm/reducers/RulesReducer.d.ts +2 -2
- package/lib/esm/reducers/RulesReducer.d.ts.map +1 -1
- package/lib/esm/reducers/RulesReducer.js +3 -7
- package/lib/esm/scss/_main.scss +53 -27
- package/lib/esm/scss/_pf4-overrides.scss +23 -0
- package/package.json +6 -6
- package/lib/esm/components/OpenCase/CaseTypeSelectorPage.d.ts +0 -2
- package/lib/esm/components/OpenCase/CaseTypeSelectorPage.d.ts.map +0 -1
- package/lib/esm/components/OpenCase/CaseTypeSelectorPage.js +0 -40
|
@@ -37,10 +37,10 @@ function CaseType(props) {
|
|
|
37
37
|
const afterLocalChange = () => setLocalTypeChange(false);
|
|
38
38
|
return (React.createElement("div", { className: `form-group ${props.className}`, id: `${props.id}` },
|
|
39
39
|
React.createElement("h3", { className: "subheading subheading-sm" },
|
|
40
|
-
React.createElement(Trans, null, "
|
|
40
|
+
React.createElement(Trans, null, "Support type"),
|
|
41
41
|
React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localTypeChange, value: props.selectedType, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.type) }),
|
|
42
42
|
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
|
|
43
|
-
React.createElement(Dropdown, { name: "open-
|
|
43
|
+
React.createElement(Dropdown, { name: "open-support-type", placeholder: t(`Select`), title: t(`Select a category`), list: props.allTypes ? 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" })));
|
|
44
44
|
}
|
|
45
45
|
CaseType.defaultProps = defaultProps;
|
|
46
46
|
export default CaseType;
|
|
@@ -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":"AAwCA,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,MAAM,eAgejD"}
|
|
@@ -26,7 +26,6 @@ import { usePostComment } from '../../shared/usePostComment';
|
|
|
26
26
|
import { ReopenCaseModal } from '../ConfirmationModals/ReopenCaseModal';
|
|
27
27
|
import { PDFContext } from '../PDFContainer';
|
|
28
28
|
import { CaseInformation } from '../Tabs/CaseDetails/CaseInformation';
|
|
29
|
-
import Summary from '../Tabs/CaseDetails/Summary';
|
|
30
29
|
import CaseOwnerInfo from './CaseOwnerInfo';
|
|
31
30
|
import CaseStatus from './CaseStatus';
|
|
32
31
|
import CaseType from './CaseType';
|
|
@@ -110,11 +109,11 @@ export default function CaseOverview(props) {
|
|
|
110
109
|
try {
|
|
111
110
|
yield updateCaseDetails(caseDispatch, props.caseNumber, { caseType: type });
|
|
112
111
|
setTypeUpdating(caseOverviewDispatch, false);
|
|
113
|
-
ToastNotification.addSuccessMessage(t('
|
|
112
|
+
ToastNotification.addSuccessMessage(t('Support type has been successfully updated'));
|
|
114
113
|
}
|
|
115
114
|
catch (e) {
|
|
116
115
|
setTypeUpdating(caseOverviewDispatch, false);
|
|
117
|
-
caseUpdateError.showError(e, t('
|
|
116
|
+
caseUpdateError.showError(e, t('Support type failed to update'));
|
|
118
117
|
}
|
|
119
118
|
});
|
|
120
119
|
const onSeverityChange = (payLoad) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -240,8 +239,6 @@ export default function CaseOverview(props) {
|
|
|
240
239
|
React.createElement(Trans, null, isCaseInOpenState ? 'Close case' : 'Reopen case')))),
|
|
241
240
|
React.createElement("div", { className: `case-details-header-secondary push-bottom-narrow ${isExportingPDF && !viewAsCustomer ? 'hide-in-pdf' : ''}` },
|
|
242
241
|
React.createElement("span", { className: "case-support-level" }, computeSupportLink())),
|
|
243
|
-
React.createElement("div", { className: "case-details-summary push-bottom-narrow" },
|
|
244
|
-
React.createElement(Summary, { inlineEditable: true, hideLabel: true })),
|
|
245
242
|
canSeeManagedByPartnerFlag && (React.createElement(Label, { className: "push-right-narrow", color: "green" },
|
|
246
243
|
React.createElement(Trans, null, "Managed by a partner"))),
|
|
247
244
|
canSeeInternalFlags && (React.createElement(React.Fragment, null,
|
|
@@ -277,7 +274,7 @@ export default function CaseOverview(props) {
|
|
|
277
274
|
React.createElement("div", { className: "form-wrapper" },
|
|
278
275
|
React.createElement(CaseType, { selectedType: caseType, onTypeChange: onTypeChange, isDisabled: !canManageCase || allCaseTypes.isFetching, allTypes: allCaseTypes.data, isFetching: caseOverviewState.caseTypeUpdating && isCaseUpdating, hasError: allCaseTypes.isError })),
|
|
279
276
|
React.createElement("div", { className: "form-wrapper" },
|
|
280
|
-
React.createElement(Severity, {
|
|
277
|
+
React.createElement(Severity, { onSeverityChange: onSeverityChange, isDisabled: !canManageCase, isFetching: caseOverviewState.caseSeverityUpdating && isCaseUpdating })))),
|
|
281
278
|
React.createElement(ExpandableSection, { className: "case-details-main", toggleText: t('Case information'), isExpanded: isDetailsExpanded, onToggle: onToggleDetails },
|
|
282
279
|
React.createElement(CaseInformation, null))),
|
|
283
280
|
showCloseCaseModal && (React.createElement(CloseCaseModal, { onConfirm: (commentBody) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseAlternateId.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseAlternateId.tsx"],"names":[],"mappings":"AA2BA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAOD,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"CaseAlternateId.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseAlternateId.tsx"],"names":[],"mappings":"AA2BA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAOD,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,eAgLrC;kBAhLQ,eAAe;;;AAmLxB,eAAe,eAAe,CAAC"}
|
|
@@ -62,11 +62,11 @@ function CaseAlternateId(props) {
|
|
|
62
62
|
setIsUpdating(true);
|
|
63
63
|
const caseDetails = { alternateId: alternateIdState === null || alternateIdState === void 0 ? void 0 : alternateIdState.trim() };
|
|
64
64
|
yield updateCaseDetails(caseDispatch, caseNumber, caseDetails);
|
|
65
|
-
ToastNotification.addSuccessMessage(t(`
|
|
65
|
+
ToastNotification.addSuccessMessage(t(`Personal reference number has been successfully updated`));
|
|
66
66
|
setIsUpdating(false);
|
|
67
67
|
}
|
|
68
68
|
catch (e) {
|
|
69
|
-
caseUpdateError.showError(e, t('
|
|
69
|
+
caseUpdateError.showError(e, t('Personal reference number failed to update'));
|
|
70
70
|
setIsUpdating(false);
|
|
71
71
|
throw e;
|
|
72
72
|
}
|
|
@@ -82,7 +82,7 @@ function CaseAlternateId(props) {
|
|
|
82
82
|
setAlternateIdState(alternateId);
|
|
83
83
|
setIsCancelClicked(!isCancelClicked);
|
|
84
84
|
};
|
|
85
|
-
const maxLengthErrorMessage = t('
|
|
85
|
+
const maxLengthErrorMessage = t('Personal reference number cannot be more than {{limit}} characters.', {
|
|
86
86
|
limit: ALTERNATE_CASE_ID_LIMIT,
|
|
87
87
|
});
|
|
88
88
|
// Conditions to disable save button
|
|
@@ -100,13 +100,13 @@ function CaseAlternateId(props) {
|
|
|
100
100
|
});
|
|
101
101
|
return (React.createElement(React.Fragment, null,
|
|
102
102
|
React.createElement(NewInlineEdit, { labelProps: { htmlFor: 'case-details-alternate-id' }, labelContent: React.createElement(React.Fragment, null,
|
|
103
|
-
React.createElement(Trans, null, "
|
|
103
|
+
React.createElement(Trans, null, "Personal reference number"),
|
|
104
104
|
React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localAltIDChange, value: alternateId, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.altID) }),
|
|
105
105
|
' ',
|
|
106
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: props.inlineEditable, content: alternateId || t('No
|
|
107
|
+
React.createElement(InfoIcon, { className: "pf-u-ml-sm", "aria-label": "Case Alternate ID" }))), allowInlineEdit: props.inlineEditable, content: alternateId || t('No personal reference number to display.'), hideSaveCancel: props.hideSaveCancel, saveDisabled: saveDisabled, charCount: (alternateIdState === null || alternateIdState === void 0 ? void 0 : alternateIdState.length) || 0, charTotal: ALTERNATE_CASE_ID_LIMIT, cancelToggleState: isCancelClicked, saveToggleState: isSaveClicked },
|
|
108
108
|
React.createElement(TextInputGroup, null,
|
|
109
|
-
React.createElement(TextInput, { value: alternateIdState, type: "text", className: "form-control", id: "case-details-alternate-id", placeholder: t(`Enter
|
|
109
|
+
React.createElement(TextInput, { value: alternateIdState, type: "text", className: "form-control", id: "case-details-alternate-id", placeholder: t(`Enter the reference number used personally or within your company`), onChange: onAlternateIdChange, "data-tracking-id": "case-details-alternate-id", isDisabled: isUpdating, onKeyDown: handleKeyDown, validated: (alternateIdState === null || alternateIdState === void 0 ? void 0 : alternateIdState.length) > ALTERNATE_CASE_ID_LIMIT
|
|
110
110
|
? ValidatedOptions.error
|
|
111
111
|
: ValidatedOptions.default }),
|
|
112
112
|
!isUpdating ? (React.createElement(InputGroupText, { variant: InputGroupTextVariant.plain },
|
|
@@ -115,9 +115,9 @@ function CaseAlternateId(props) {
|
|
|
115
115
|
React.createElement("button", { className: "btn btn-app btn-link", type: "button", onClick: onCancel },
|
|
116
116
|
React.createElement(TimesIcon, { color: "#6A6E73" })))) : (React.createElement(InputGroupText, { variant: InputGroupTextVariant.plain },
|
|
117
117
|
React.createElement(Spinner, { isSVG: true, size: "lg", className: "pf-u-ml-2xl pf-u-mr-xl" }))))),
|
|
118
|
-
(alternateIdState === null || alternateIdState === void 0 ? void 0 : alternateIdState.length) > ALTERNATE_CASE_ID_LIMIT
|
|
119
|
-
React.createElement("p", { className: "form-instructions
|
|
120
|
-
|
|
118
|
+
React.createElement("div", { className: "pull-top" }, (alternateIdState === null || alternateIdState === void 0 ? void 0 : alternateIdState.length) > ALTERNATE_CASE_ID_LIMIT ? (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
119
|
+
React.createElement(Trans, null, maxLengthErrorMessage))) : (React.createElement("p", { className: "form-instructions" },
|
|
120
|
+
React.createElement(Trans, null, "Add a personal or company reference number to help you connect, organize, and track cases."))))));
|
|
121
121
|
}
|
|
122
122
|
CaseAlternateId.defaultProps = defaultProps;
|
|
123
123
|
export default CaseAlternateId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseAttachment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAcxE,OAAO,KAAuC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseAttachment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAcxE,OAAO,KAAuC,MAAM,OAAO,CAAC;AAS5D,UAAU,MAAM;IACZ,UAAU,EAAE,WAAW,CAAC;IACxB,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,WAAW,KAAK,IAAI,CAAC;IACzE,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,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,cAAc,4EAoPlB,CAAC;AAEH,eAAe,cAAc,CAAC"}
|
|
@@ -16,12 +16,13 @@ import { formatDateTime, humanizeSize } from '@rh-support/utils';
|
|
|
16
16
|
import isEmpty from 'lodash/isEmpty';
|
|
17
17
|
import React, { useContext, useRef, useState } from 'react';
|
|
18
18
|
import { Trans, useTranslation } from 'react-i18next';
|
|
19
|
+
import { ATTACHMENT_DESCRIPTION_LENGTH_LIMIT } from '../../../../reducers/CaseConstNTypes';
|
|
19
20
|
import { DiscussionType } from '../../../../reducers/CaseDiscussionTabReducer';
|
|
20
21
|
import { PDFContext } from '../../PDFContainer';
|
|
21
22
|
import { DiscussionItemLink } from './DiscussionItemLink';
|
|
22
23
|
import { JumpAndCopyLink } from './JumpAndCopyLink';
|
|
23
24
|
const CaseAttachment = React.forwardRef((props, ref) => {
|
|
24
|
-
var _a;
|
|
25
|
+
var _a, _b;
|
|
25
26
|
const { t } = useTranslation();
|
|
26
27
|
const clipboardRef = useRef(null);
|
|
27
28
|
const { clipboardText, copyToClipboard } = useCopyToClipboard(clipboardRef);
|
|
@@ -78,8 +79,8 @@ const CaseAttachment = React.forwardRef((props, ref) => {
|
|
|
78
79
|
const onAttachmentDownloadClick = () => {
|
|
79
80
|
let { downloadAttachment, attachment: { caseNumber, uuid, fileName }, } = props;
|
|
80
81
|
downloadAttachment({
|
|
81
|
-
caseNumber,
|
|
82
|
-
uuid,
|
|
82
|
+
caseNumber: caseNumber,
|
|
83
|
+
uuid: uuid,
|
|
83
84
|
name: fileName,
|
|
84
85
|
});
|
|
85
86
|
};
|
|
@@ -110,6 +111,12 @@ const CaseAttachment = React.forwardRef((props, ref) => {
|
|
|
110
111
|
const onJumpToComment = (attachmentId) => () => props.showJumpToComment && props.onJumpToComment && props.onJumpToComment(attachmentId);
|
|
111
112
|
if (((_a = props.attachment) === null || _a === void 0 ? void 0 : _a.isPrivate) && !canSeePrivateAttachments)
|
|
112
113
|
return React.createElement(React.Fragment, null);
|
|
114
|
+
// Attachment description length error message
|
|
115
|
+
const maxCaseAttachmentDescription = t('Attachment description cannot be more than {{limit}} characters.', {
|
|
116
|
+
limit: ATTACHMENT_DESCRIPTION_LENGTH_LIMIT,
|
|
117
|
+
});
|
|
118
|
+
// To check if attachment description length is less than the limit
|
|
119
|
+
const isCaseAttachmentDescriptionLengthy = ((_b = attachmentDescription) === null || _b === void 0 ? void 0 : _b.length) > ATTACHMENT_DESCRIPTION_LENGTH_LIMIT;
|
|
113
120
|
// To check if attachment description is empty
|
|
114
121
|
const isCaseAttachmentDescription = isEmpty(attachmentDescription === null || attachmentDescription === void 0 ? void 0 : attachmentDescription.trim());
|
|
115
122
|
return (React.createElement("section", { ref: ref, id: props.attachment.id, className: `prevent-split support-comment comment-attachment ${!isCardIsDeleted ? 'showcard' : ''} ${ref ? 'selected-case-comment' : ''} ${props.attachment.isPrivate ? 'private' : ''}` },
|
|
@@ -132,10 +139,13 @@ const CaseAttachment = React.forwardRef((props, ref) => {
|
|
|
132
139
|
React.createElement("code", { ref: clipboardRef }, props.attachment.checksum)),
|
|
133
140
|
React.createElement(Tooltip, { position: TooltipPosition.top, content: clipboardText, trigger: "click" },
|
|
134
141
|
React.createElement("button", { className: "nimbus-icon-clipboard clip-code-raw-btn xs-icon", "aria-hidden": "true", onClick: copyToClipboard }))))),
|
|
135
|
-
React.createElement(InlineEdit, { labelProps: { htmlFor: `case-details-file-description-${props.attachment.id}` }, allowInlineEdit: true, labelContent:
|
|
142
|
+
React.createElement(InlineEdit, { labelProps: { htmlFor: `case-details-file-description-${props.attachment.id}` }, allowInlineEdit: true, labelContent: t('Description'), content: React.createElement("div", { className: "clip-content-wrapper code-block" }, props.attachment.description), hideSaveCancel: false, onSave: onDescriptionSave, onCancel: onDescriptionCancel, dataTrackingId: "case-details-file-description", initialIsEditing: props.attachment.description ? false : true, saveDisabled: isCaseAttachmentDescriptionLengthy ||
|
|
143
|
+
isCaseAttachmentDescription ||
|
|
136
144
|
attachmentDescription === props.attachment.description ||
|
|
137
|
-
isUpdating, loadingIndicator: isUpdating ? React.createElement(LoadingIndicator, { isInline: true }) :
|
|
138
|
-
React.createElement("input", { id: `case-details-file-description-${props.attachment.id}`, value: attachmentDescription, type: "text", className: "form-control", placeholder: t(`Enter a description`), onChange: onDescriptionChange, disabled: isUpdating,
|
|
145
|
+
isUpdating, loadingIndicator: isUpdating ? React.createElement(LoadingIndicator, { isInline: true }) : undefined },
|
|
146
|
+
React.createElement("input", { id: `case-details-file-description-${props.attachment.id}`, value: attachmentDescription, type: "text", className: "form-control", placeholder: t(`Enter a description`), onChange: onDescriptionChange, disabled: isUpdating, "data-tracking-id": `case-details-file-description-input` })))),
|
|
147
|
+
isCaseAttachmentDescriptionLengthy && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
148
|
+
React.createElement(Trans, null, maxCaseAttachmentDescription))),
|
|
139
149
|
React.createElement("footer", null,
|
|
140
150
|
React.createElement("span", { className: "comment-note" }, props.attachment.isPrivate && React.createElement(Trans, null, "Private attachment")),
|
|
141
151
|
React.createElement("span", { className: "pull-right pf-l-flex pf-m-align-items-center" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseInformation.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/CaseInformation.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseInformation.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/CaseInformation.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAYvD,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,eA4HpD"}
|
|
@@ -13,7 +13,6 @@ import { Hostname } from '../ImproveCase/Hostname';
|
|
|
13
13
|
import KtQuestions from '../ImproveCase/KtQuestions';
|
|
14
14
|
import { AllProductsSelector } from '../ProductSelector/AllProductsSelector';
|
|
15
15
|
import Description from './Description';
|
|
16
|
-
import { FileDiag } from './FileDiag';
|
|
17
16
|
import OpenCaseIssue from './OpenCaseIssue';
|
|
18
17
|
export default function CaseInformation(props) {
|
|
19
18
|
const { t } = useTranslation();
|
|
@@ -90,10 +89,9 @@ export default function CaseInformation(props) {
|
|
|
90
89
|
canManageCase(loggedInUserJwtToken) && (React.createElement(React.Fragment, null,
|
|
91
90
|
React.createElement("form", { onSubmit: handleFormSubmit },
|
|
92
91
|
skippedTroubleshooting && (React.createElement(AllProductsSelector, { isDropdownSelected: true, routeProps: props.routeProps, loadTCOnChange: true, checkEntitledProduct: true })),
|
|
93
|
-
React.createElement(OpenShiftClusterId, null),
|
|
94
92
|
React.createElement(Hostname, null),
|
|
93
|
+
React.createElement(OpenShiftClusterId, null),
|
|
95
94
|
skippedTroubleshooting && React.createElement(OpenCaseIssue, { inlineEditable: false, required: true }),
|
|
96
95
|
React.createElement(Description, { inlineEditable: false }),
|
|
97
|
-
React.createElement(KtQuestions, null)
|
|
98
|
-
React.createElement(FileDiag, null))))));
|
|
96
|
+
React.createElement(KtQuestions, null))))));
|
|
99
97
|
}
|
|
@@ -24,11 +24,11 @@ export default function CaseType(props) {
|
|
|
24
24
|
validateCaseType(option);
|
|
25
25
|
};
|
|
26
26
|
return (React.createElement("div", { className: "form-group" },
|
|
27
|
-
React.createElement("label", { htmlFor: "open-
|
|
28
|
-
React.createElement(Trans, null, "
|
|
27
|
+
React.createElement("label", { htmlFor: "open-support-type" },
|
|
28
|
+
React.createElement(Trans, null, "Support type"),
|
|
29
29
|
' ',
|
|
30
30
|
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
|
|
31
|
-
React.createElement(Dropdown, { id: "open-
|
|
31
|
+
React.createElement(Dropdown, { id: "open-support-type", name: "open-support-type", placeholder: t(`Select a category`), title: t(`Select a category`), list: allCaseTypes.data ? toOptions(allCaseTypes.data) : [], selectedItem: toOption(caseType), disabled: allCaseTypes.isError, isLoadingList: allCaseTypes.isFetching, isInValid: isCaseTypeInValid, required: true, onChange: onCaseTypeChange, onOuterClick: validateCaseType, "data-tracking-id": "open-support-type" })));
|
|
32
32
|
}, [
|
|
33
33
|
allCaseTypes.data,
|
|
34
34
|
allCaseTypes.isError,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Description.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Description.tsx"],"names":[],"mappings":"AAkBA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Description.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Description.tsx"],"names":[],"mappings":"AAkBA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,MAAM,eAkGhD"}
|
|
@@ -46,7 +46,7 @@ export default function Description(props) {
|
|
|
46
46
|
React.createElement(Trans, null, "What are you experiencing? What are you expecting to happen?"),
|
|
47
47
|
' ',
|
|
48
48
|
isKT1Required && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))), labelProps: { htmlFor: 'open-case-ktQ1-issue' }, content: issue, allowInlineEdit: !!props.inlineEditable, hideSaveCancel: !!props.hideSaveCancel, initialIsEditing: isEmpty(issue), usePreformattedTag: true, saveOnBlur: true },
|
|
49
|
-
React.createElement(TextArea, { id: "open-case-ktQ1-issue", name: "open-case-ktQ1-issue", className: `form-control${isDescriptionInvalid(issue) || (showValidationErrorAlert && isEmpty(issue)) ? ' form-invalid' : ''}`, "aria-invalid": (issue === null || issue === void 0 ? void 0 : issue.length) > CASE_DEATILS_ISSUE_LIMIT ? 'true' : 'false', "aria-required": isKT1Required, isRequired: isKT1Required, value: issue, isDisabled: isEmpty(issue) && hasLargeCaseDescription && !setIssueTextAreaFocused, onChange: onKTQ1IssueChange, onFocus: onKTQ1IssueFocusChange, onBlur: onKTQ1IssueFocusChange, "data-tracking-id": "open-case-ktQ1-issue" }),
|
|
49
|
+
React.createElement(TextArea, { id: "open-case-ktQ1-issue", name: "open-case-ktQ1-issue", className: `form-control${isDescriptionInvalid(issue) || (showValidationErrorAlert && isEmpty(issue)) ? ' form-invalid' : ''}`, "aria-invalid": (issue === null || issue === void 0 ? void 0 : issue.length) > CASE_DEATILS_ISSUE_LIMIT ? 'true' : 'false', "aria-required": isKT1Required, isRequired: isKT1Required, value: issue, isDisabled: isEmpty(issue) && hasLargeCaseDescription && !setIssueTextAreaFocused, onChange: onKTQ1IssueChange, onFocus: onKTQ1IssueFocusChange, onBlur: onKTQ1IssueFocusChange, "data-tracking-id": "open-case-ktQ1-issue", placeholder: t('Please enter an elaborate description') }),
|
|
50
50
|
React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-20k-warning-ktQ1-environment" }, `${(issue === null || issue === void 0 ? void 0 : issue.length) > CASE_DEATILS_ISSUE_LIMIT
|
|
51
51
|
? `Description cannot be more than ${CASE_DEATILS_ISSUE_LIMIT} characters`
|
|
52
52
|
: ''}`),
|
|
@@ -39,12 +39,12 @@ function OpenCaseIssue(props) {
|
|
|
39
39
|
});
|
|
40
40
|
return (React.createElement(React.Fragment, null,
|
|
41
41
|
React.createElement(InlineEdit, { labelProps: { htmlFor: 'open-case-summary' }, labelContent: React.createElement(React.Fragment, null,
|
|
42
|
-
React.createElement(Trans, null, "
|
|
42
|
+
React.createElement(Trans, null, "Summary"),
|
|
43
43
|
' ',
|
|
44
44
|
!!props.required && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))), allowInlineEdit: props.inlineEditable, hideSaveCancel: !!props.hideSaveCancel, initialIsEditing: !!props.initialIsEditing, saveOnBlur: true, collapseOnBlur: !!props.collapseOnBlur && !isSummaryInValid, content: summary },
|
|
45
45
|
React.createElement("input", { type: "text", id: "open-case-summary", className: `form-control${isSummaryInValid || hasLargeSummary || (showValidationErrorAlert && !summary)
|
|
46
46
|
? ' form-invalid'
|
|
47
|
-
: ''}`, "aria-invalid": isSummaryInValid, "aria-required": !!props.required, required: !!props.required, name: "open-case-summary", placeholder: t('
|
|
47
|
+
: ''}`, "aria-invalid": isSummaryInValid, "aria-required": !!props.required, required: !!props.required, name: "open-case-summary", placeholder: t("Summarize what you're experiencing today"), value: summary, onChange: onSummaryChange, onBlur: onSummaryBlur, autoFocus: !!props.autoFocus, "data-tracking-id": "open-case-summary" })),
|
|
48
48
|
(summary === null || summary === void 0 ? void 0 : summary.length) > SUMMARY_LENGTH_LIMIT && (React.createElement("div", { className: "pull-top" },
|
|
49
49
|
React.createElement("p", { className: "form-instructions form-invalid" },
|
|
50
50
|
React.createElement(Trans, null, maxLengthErrorMessage))))));
|
|
@@ -3,9 +3,8 @@ import { IDClassNameProps } from '@rh-support/types/shared';
|
|
|
3
3
|
interface IProps extends IDClassNameProps {
|
|
4
4
|
isDisabled?: boolean;
|
|
5
5
|
isFetching?: boolean;
|
|
6
|
-
onSeverityChange
|
|
6
|
+
onSeverityChange?: (casePayload: Partial<ICasePayload>) => void;
|
|
7
7
|
showSeverityInfoIcon: boolean;
|
|
8
|
-
onCaseDetailsPage?: boolean;
|
|
9
8
|
}
|
|
10
9
|
export interface ISeverityOptions {
|
|
11
10
|
disabled: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Severity.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Severity.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAKvE,OAAO,EAAE,gBAAgB,EAAW,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"Severity.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Severity.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAKvE,OAAO,EAAE,gBAAgB,EAAW,MAAM,0BAA0B,CAAC;AAwBrE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;IAChE,oBAAoB,EAAE,OAAO,CAAC;CACjC;AASD,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;CACxD;AAED,iBAAS,QAAQ,CAAC,KAAK,EAAE,MAAM,eAoR9B;kBApRQ,QAAQ;;;AAsRjB,eAAe,QAAQ,CAAC"}
|
|
@@ -11,8 +11,9 @@ import isEqual from 'lodash/isEqual';
|
|
|
11
11
|
import map from 'lodash/map';
|
|
12
12
|
import React, { useContext, useEffect, useState } from 'react';
|
|
13
13
|
import { Trans, useTranslation } from 'react-i18next';
|
|
14
|
-
import { useCaseSelector } from '../../context/CaseContext';
|
|
14
|
+
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
15
15
|
import { getIrtForSLAAndSeverity, getOrtForSLAAndSeverity, getSeverityDescription } from '../../reducers/CaseHelpers';
|
|
16
|
+
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
16
17
|
import { CaseValuesToWatch } from '../shared/Constants';
|
|
17
18
|
import { getChangedValueTooltip } from '../shared/utils';
|
|
18
19
|
import UpdateSeverityModal from '../UpdateSeverityModal/UpdateSeverityModal';
|
|
@@ -38,13 +39,18 @@ function Severity(props) {
|
|
|
38
39
|
const [seviritiesOptions, setSeveritiesOptions] = useState([]);
|
|
39
40
|
const [doNotShowIRT, setDoNotShowIRT] = useState(false);
|
|
40
41
|
const [openUpdateSeverityModal, setOpenUpdateSeverityModal] = useState(false);
|
|
42
|
+
const caseDispatch = useCaseDispatch();
|
|
43
|
+
const isOnCaseDetailsPage = !isEmpty(caseNumber);
|
|
41
44
|
const updateState = (value) => {
|
|
42
45
|
const casePayload = { severity: value };
|
|
43
|
-
// .. change fts on sev change only while creating case or
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
if (
|
|
47
|
-
props.onSeverityChange(casePayload);
|
|
46
|
+
// .. change fts on sev change only while creating case or when we change to sev1
|
|
47
|
+
!isOnCaseDetailsPage && (casePayload.fts = showFtsOnCreateCasePage(entitlementSla, value));
|
|
48
|
+
isOnCaseDetailsPage && autoEnableFtsOnCaseViewEditPage(entitlementSla, value) && (casePayload.fts = true);
|
|
49
|
+
if (isOnCaseDetailsPage) {
|
|
50
|
+
props.onSeverityChange && props.onSeverityChange(casePayload);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
setCaseDetails(caseDispatch, casePayload);
|
|
48
54
|
}
|
|
49
55
|
};
|
|
50
56
|
const onSeverityChange = (option) => {
|
|
@@ -134,7 +140,7 @@ function Severity(props) {
|
|
|
134
140
|
availableSeverities = (_c = allCaseSeverities.data) !== null && _c !== void 0 ? _c : [];
|
|
135
141
|
}
|
|
136
142
|
setSeveritiesOptions(availableSeverities.sort((sevA, sevB) => severitySort(sevA, sevB)));
|
|
137
|
-
const shouldUpdateSeverityOnCaseCreate = !
|
|
143
|
+
const shouldUpdateSeverityOnCaseCreate = !isOnCaseDetailsPage && (!severity || !includes(availableSeverities, severity));
|
|
138
144
|
if (shouldUpdateSeverityOnCaseCreate) {
|
|
139
145
|
updateState(availableSeverities[0]);
|
|
140
146
|
}
|
|
@@ -154,7 +160,7 @@ function Severity(props) {
|
|
|
154
160
|
"\u00A0",
|
|
155
161
|
filteredSeverities.filter((s) => s.disabled).length !== 0 && (React.createElement(Tooltip, { position: TooltipPosition.top, content: React.createElement(Trans, null, "Only the enabled severity levels are supported for selected product and version.") },
|
|
156
162
|
React.createElement(WarningTriangleIcon, { color: "#ec7a08", size: "sm", title: "Support Severity Level warning" })))),
|
|
157
|
-
!props.isDisabled &&
|
|
163
|
+
!props.isDisabled && isOnCaseDetailsPage ? (React.createElement(React.Fragment, null,
|
|
158
164
|
React.createElement("div", { onClick: toggleModal },
|
|
159
165
|
React.createElement(Dropdown, { name: "open-case-severity", placeholder: t(`Select a severity`), title: t(`Select a severity`), list: allCaseSeverities.data
|
|
160
166
|
? toOptions(filteredSeverities, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SupportLevel.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/SupportLevel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SupportLevel.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/SupportLevel.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAU5D,UAAU,MAAO,SAAQ,gBAAgB;CAAG;AAO5C,iBAAS,YAAY,CAAC,KAAK,EAAE,MAAM,eA4HlC;kBA5HQ,YAAY;;;AA8HrB,eAAe,YAAY,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { Popover, PopoverPosition } from '@patternfly/react-core';
|
|
2
|
-
import { Dropdown } from '@rh-support/components';
|
|
1
|
+
import { Popover, PopoverPosition, Select, SelectOption, SelectVariant, ValidatedOptions, } from '@patternfly/react-core';
|
|
3
2
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
4
|
-
import { showFtsOnCaseViewEditPage, showFtsOnCreateCasePage
|
|
3
|
+
import { showFtsOnCaseViewEditPage, showFtsOnCreateCasePage } from '@rh-support/utils';
|
|
5
4
|
import isEmpty from 'lodash/isEmpty';
|
|
6
5
|
import isEqual from 'lodash/isEqual';
|
|
7
|
-
import React, { useContext, useState } from 'react';
|
|
6
|
+
import React, { useContext, useEffect, useState } from 'react';
|
|
8
7
|
import { Trans, useTranslation } from 'react-i18next';
|
|
9
8
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
10
9
|
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
@@ -24,49 +23,54 @@ function SupportLevel(props) {
|
|
|
24
23
|
const { globalMetadataState: { allProducts }, } = useContext(GlobalMetadataStateContext);
|
|
25
24
|
const { t } = useTranslation();
|
|
26
25
|
const [isSupportLevelInValid, setIsSupportLevelInValid] = useState(false);
|
|
26
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
27
|
+
const onToggle = (isOpen) => {
|
|
28
|
+
setIsOpen(isOpen);
|
|
29
|
+
};
|
|
27
30
|
const onCaseDetailsChange = (caseDetails) => {
|
|
28
31
|
setCaseDetails(caseDispatch, caseDetails);
|
|
29
32
|
};
|
|
30
|
-
const onEntitlementChange = (
|
|
31
|
-
|
|
33
|
+
const onEntitlementChange = (event, selected) => {
|
|
34
|
+
setIsOpen(false);
|
|
35
|
+
const casePayload = { entitlementSla: selected };
|
|
32
36
|
casePayload.fts = caseNumber
|
|
33
|
-
? showFtsOnCaseViewEditPage(
|
|
34
|
-
: showFtsOnCreateCasePage(
|
|
35
|
-
|
|
37
|
+
? showFtsOnCaseViewEditPage(selected, severity)
|
|
38
|
+
: showFtsOnCreateCasePage(selected, severity);
|
|
39
|
+
setIsSupportLevelInValid(isEmpty(selected));
|
|
36
40
|
onCaseDetailsChange(casePayload);
|
|
37
41
|
};
|
|
38
|
-
const validateSupportLevel = (selectedItem) => {
|
|
39
|
-
const isInvalid = isEmpty(selectedItem) || isEmpty(selectedItem.label);
|
|
40
|
-
setIsSupportLevelInValid(isInvalid);
|
|
41
|
-
};
|
|
42
42
|
const getSlaList = () => {
|
|
43
43
|
var _a, _b;
|
|
44
44
|
const entitledProduct = ((_b = (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult) !== null && _b !== void 0 ? _b : []).find((entitledProduct) => entitledProduct.product === product);
|
|
45
45
|
if (entitledProduct && entitledProduct.serviceLevels) {
|
|
46
|
-
return
|
|
46
|
+
return entitledProduct.serviceLevels.split(';') || [];
|
|
47
47
|
}
|
|
48
48
|
else {
|
|
49
|
-
return ownersEntitlements.data ?
|
|
49
|
+
return ownersEntitlements.data ? ownersEntitlements.data.map((sla) => sla.slaProcessId) : [];
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
const slaProcessId = entitlementSla;
|
|
53
52
|
const getSelectedSla = () => {
|
|
54
53
|
var _a, _b;
|
|
55
54
|
const entitledProduct = ((_b = (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult) !== null && _b !== void 0 ? _b : []).find((entitledProduct) => entitledProduct.product === product);
|
|
56
55
|
// if sla is empty then it means either first time this component is rendered or product has changed.
|
|
57
|
-
if (isEmpty(
|
|
56
|
+
if (isEmpty(entitlementSla) && entitledProduct && entitledProduct.preferredServiceLevel) {
|
|
58
57
|
return entitledProduct.preferredServiceLevel;
|
|
59
58
|
}
|
|
60
59
|
else {
|
|
61
|
-
return isEmpty(
|
|
60
|
+
return isEmpty(entitlementSla) && !isEmpty(ownersEntitlements.data)
|
|
62
61
|
? ownersEntitlements.data[0].slaProcessId
|
|
63
|
-
:
|
|
62
|
+
: entitlementSla;
|
|
64
63
|
}
|
|
65
64
|
};
|
|
66
65
|
const selectedSla = getSelectedSla();
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
if (!selectedSla || entitlementSla)
|
|
68
|
+
return;
|
|
69
|
+
if (entitlementSla !== selectedSla) {
|
|
70
|
+
onCaseDetailsChange({ entitlementSla: selectedSla });
|
|
71
|
+
}
|
|
72
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
73
|
+
}, [selectedSla, entitlementSla]);
|
|
70
74
|
return (React.createElement("div", { className: `form-group ${props.className}`, id: `${props.id}` },
|
|
71
75
|
React.createElement("label", { htmlFor: "open-case-support-level" },
|
|
72
76
|
React.createElement(Trans, null, "Support level"),
|
|
@@ -78,7 +82,7 @@ function SupportLevel(props) {
|
|
|
78
82
|
' ',
|
|
79
83
|
React.createElement("a", { href: "/support/offerings/production/sla", target: "_blank" }, "production support service level agreement"))), closeBtnAriaLabel: "Close" },
|
|
80
84
|
React.createElement("i", { "aria-label": "Support Level info", className: "fa fa-question-circle" })),
|
|
81
|
-
React.createElement(
|
|
85
|
+
React.createElement(Select, { variant: SelectVariant.single, "aria-label": t('Select Support Level'), onToggle: onToggle, onSelect: onEntitlementChange, selections: selectedSla, isOpen: isOpen, "aria-labelledby": 'open-case-support-level', isDisabled: ownersEntitlements.isError || isEmpty(ownersEntitlements.data), validated: isSupportLevelInValid ? ValidatedOptions.error : ValidatedOptions.default, "data-tracking-id": "open-case-support-level" }, [getSlaList(), ''].map((sla, index) => (React.createElement(SelectOption, { value: sla, key: index })))),
|
|
82
86
|
isEmpty(ownersEntitlements.data) && (React.createElement("p", { className: "form-instructions" }, ownersEntitlements.isError ? t('Error loading support levels') : t('No active subscriptions')))));
|
|
83
87
|
}
|
|
84
88
|
SupportLevel.defaultProps = defaultProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseLanguageSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/CaseLanguageSelector.tsx"],"names":[],"mappings":"AAaA,MAAM,WAAW,MAAM;
|
|
1
|
+
{"version":3,"file":"CaseLanguageSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/CaseLanguageSelector.tsx"],"names":[],"mappings":"AAaA,MAAM,WAAW,MAAM;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,KAAK,EAAE,MAAM,eAuFzD"}
|
|
@@ -1,38 +1,58 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Select, SelectOption, SelectVariant, ValidatedOptions } from '@patternfly/react-core';
|
|
2
2
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
3
|
+
import { ability, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
4
|
+
import isEmpty from 'lodash/isEmpty';
|
|
3
5
|
import isEqual from 'lodash/isEqual';
|
|
4
|
-
import
|
|
5
|
-
import React, { useContext } from 'react';
|
|
6
|
+
import React, { useContext, useEffect, useState } from 'react';
|
|
6
7
|
import { Trans, useTranslation } from 'react-i18next';
|
|
7
8
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
9
|
+
import { getDescriptionWOQues } from '../../reducers/CaseHelpers';
|
|
10
|
+
import { setCaseDetails, setDetectedLanguage } from '../../reducers/CaseReducer';
|
|
10
11
|
export default function CaseLanguageSelector(props) {
|
|
11
12
|
const { t } = useTranslation();
|
|
12
|
-
const { caseLanguage, isLoadingLang } = useCaseSelector((state) => ({
|
|
13
|
+
const { summary, issue, environment, periodicityOfIssue, timeFramesAndUrgency, caseLanguage, isLoadingLang } = useCaseSelector((state) => ({
|
|
14
|
+
summary: state.caseDetails.summary,
|
|
15
|
+
issue: state.caseDetails.issue,
|
|
16
|
+
environment: state.caseDetails.environment,
|
|
17
|
+
periodicityOfIssue: state.caseDetails.periodicityOfIssue,
|
|
18
|
+
timeFramesAndUrgency: state.caseDetails.timeFramesAndUrgency,
|
|
13
19
|
caseLanguage: state.caseDetails.caseLanguage,
|
|
14
20
|
isLoadingLang: state.isLoadingLang,
|
|
15
21
|
}), isEqual);
|
|
22
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
23
|
+
const onToggle = (isOpen) => {
|
|
24
|
+
setIsOpen(isOpen);
|
|
25
|
+
};
|
|
26
|
+
const canUseLanguageDetection = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseDetailsFields.CASE_LANGUAGE_DETECTION);
|
|
16
27
|
const caseDispatch = useCaseDispatch();
|
|
17
28
|
const { globalMetadataState: { caseLanguages }, } = useContext(GlobalMetadataStateContext);
|
|
18
29
|
const onCaseDetailsChange = (caseDetails) => {
|
|
19
30
|
setCaseDetails(caseDispatch, caseDetails);
|
|
20
31
|
};
|
|
21
|
-
const onLanguageChange = (selection) => {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const languagesList = map(caseLanguages.data, (cl) => ({
|
|
25
|
-
label: Constants.languagesMap[cl] || cl,
|
|
26
|
-
value: cl,
|
|
27
|
-
}));
|
|
28
|
-
const selectedLanguage = {
|
|
29
|
-
label: Constants.languagesMap[caseLanguage] || caseLanguage,
|
|
30
|
-
value: caseLanguage,
|
|
32
|
+
const onLanguageChange = (event, selection) => {
|
|
33
|
+
setIsOpen(false);
|
|
34
|
+
onCaseDetailsChange({ caseLanguage: selection });
|
|
31
35
|
};
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
if (!props.isManageStep || !isEmpty(caseLanguage) || isLoadingLang || !canUseLanguageDetection)
|
|
38
|
+
return;
|
|
39
|
+
setDetectedLanguage(caseDispatch, summary, getDescriptionWOQues(issue, environment, periodicityOfIssue, timeFramesAndUrgency));
|
|
40
|
+
}, [
|
|
41
|
+
caseDispatch,
|
|
42
|
+
environment,
|
|
43
|
+
issue,
|
|
44
|
+
caseLanguage,
|
|
45
|
+
periodicityOfIssue,
|
|
46
|
+
summary,
|
|
47
|
+
timeFramesAndUrgency,
|
|
48
|
+
isLoadingLang,
|
|
49
|
+
canUseLanguageDetection,
|
|
50
|
+
props.isManageStep,
|
|
51
|
+
]);
|
|
32
52
|
return (React.createElement("div", { className: "form-group" },
|
|
33
53
|
React.createElement("label", { htmlFor: "open-case-language" },
|
|
34
54
|
React.createElement(Trans, null, "Preferred language")),
|
|
35
|
-
React.createElement(
|
|
55
|
+
React.createElement(Select, { variant: SelectVariant.single, "aria-label": t(`Select a language`), onToggle: onToggle, onSelect: onLanguageChange, selections: caseLanguage, isOpen: isOpen, "aria-labelledby": 'open-case-language', isDisabled: caseLanguages.isError, validated: caseLanguages.isError ? ValidatedOptions.error : ValidatedOptions.default }, caseLanguages.data.map((sla, index) => (React.createElement(SelectOption, { value: sla, key: index })))),
|
|
36
56
|
React.createElement("p", { className: "form-instructions" },
|
|
37
57
|
React.createElement(Trans, null, "Select a language for communicating with our support engineers"))));
|
|
38
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseManagement.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/CaseManagement.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseManagement.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/CaseManagement.tsx"],"names":[],"mappings":"AAaA,MAAM,WAAW,MAAM;CAAG;AAC1B,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,MAAM,eAwBnD"}
|