@rh-support/troubleshoot 2.6.334 → 2.6.336
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/OwnerSelector.js +5 -2
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +1 -1
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts +7 -0
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.js +17 -0
- package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Case.js +23 -19
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +2 -2
- package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +25 -10
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.js +3 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +109 -72
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +5 -7
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +2 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts +1 -0
- 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 +11 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +4 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +11 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts +3 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +47 -15
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +1 -1
- package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseGroup.js +8 -5
- package/lib/esm/components/CaseInformation/CaseLabels.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseLabels.js +5 -1
- package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Fts.js +2 -1
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts +2 -1
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +19 -3
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +13 -14
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +7 -3
- package/lib/esm/constants/caseDetailsConstants.d.ts +5 -0
- package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
- package/lib/esm/constants/caseDetailsConstants.js +5 -0
- package/lib/esm/hooks/useCaseComments/index.d.ts +1 -1
- package/lib/esm/hooks/useCaseComments/index.d.ts.map +1 -1
- package/lib/esm/hooks/useCaseComments/index.js +1 -1
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts.map +1 -1
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.js +1 -2
- package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts +1 -1
- package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts.map +1 -1
- package/lib/esm/hooks/useCaseUpdateErrorMessage.js +21 -11
- package/lib/esm/reducers/CaseConstNTypes.d.ts +1 -0
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +5 -0
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDiscussionTabReducer.js +15 -0
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +11 -12
- package/lib/esm/scss/_main.scss +9 -0
- package/package.json +6 -6
- package/lib/esm/hooks/useCaseComments/caseCommentMutation.d.ts +0 -4
- package/lib/esm/hooks/useCaseComments/caseCommentMutation.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/caseCommentMutation.js +0 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OwnerSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountInfo/OwnerSelector.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAmBxE,UAAU,MAAM;CAAG;AAMnB,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"OwnerSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountInfo/OwnerSelector.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAmBxE,UAAU,MAAM;CAAG;AAMnB,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,qBA2XnC;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -240,7 +240,10 @@ function OwnerSelector(props) {
|
|
|
240
240
|
React.createElement(Trans, null, "Owner"),
|
|
241
241
|
React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, comparator: ownerComparator, isLocalChange: localOwnerChange, value: selectedOwner.data, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.owner, (v) => v.fullNameCustom) }),
|
|
242
242
|
React.createElement("span", { className: `form-required ${isExportingPDF ? 'hide-in-pdf' : ''}`, "aria-hidden": true }, "*")),
|
|
243
|
-
showUsersWithSelectedGroupAccess && loggedInUsersAccount.data.hasGroupACLs ? (React.createElement(OwnerTypeaheadDropdown, { id: "get-support-owner", hasClearButton: true, contactSsoUsername: contactSsoUsername !== null && contactSsoUsername !== void 0 ? contactSsoUsername : '', selected: !isEmpty(selectedOwner.data) ? [selectedOwner.data] : [], isDisabled: selectedCaseGroupUsers.isFetching ||
|
|
243
|
+
showUsersWithSelectedGroupAccess && loggedInUsersAccount.data.hasGroupACLs ? (React.createElement(OwnerTypeaheadDropdown, { id: "get-support-owner", hasClearButton: true, contactSsoUsername: contactSsoUsername !== null && contactSsoUsername !== void 0 ? contactSsoUsername : '', selected: !isEmpty(selectedOwner.data) ? [selectedOwner.data] : [], isDisabled: selectedCaseGroupUsers.isFetching ||
|
|
244
|
+
isCaseOwnerUpdating ||
|
|
245
|
+
isCasePhoneUpdating ||
|
|
246
|
+
canEditCase.isCaseNotEditable, onSelect: onCustomerContactSelect, onClearQuery: onClearQuery, onQueryUpdated: onQueryUpdated, options: ownerDropdownOptions, status: isNextBtnClickedToShowValidationError && isEmpty(selectedOwner.data) ? 'danger' : undefined })) : (React.createElement(CaseContactsSelectorExternal, { loggedInUserRights: loggedInUserRights.data, selectedAccountNumber: accountNumber, contactSsoUsername: contactSsoUsername !== null && contactSsoUsername !== void 0 ? contactSsoUsername : '', selected: !isEmpty(selectedOwner.data) ? [selectedOwner.data] : [], onChange: onCustomerContactSelect, onContactEnriched: (contact) => {
|
|
244
247
|
var _a;
|
|
245
248
|
setCaseState(caseDispatch, {
|
|
246
249
|
selectedOwner: { data: contact, isFetching: false, isError: false, errorMessage: '' },
|
|
@@ -248,6 +251,6 @@ function OwnerSelector(props) {
|
|
|
248
251
|
if (contact.id && accountNumber) {
|
|
249
252
|
fetchCaseGroupsForContactGraphQL(caseDispatch, apolloClient, contact.id, accountNumber, caseNumber ? groupNumber : contact.defaultCaseGroup, (_a = contact.isOrgAdmin) !== null && _a !== void 0 ? _a : false, groupNumber);
|
|
250
253
|
}
|
|
251
|
-
}, 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), isDisabled: isCasePhoneUpdating || isCaseOwnerUpdating }))));
|
|
254
|
+
}, 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), isDisabled: isCasePhoneUpdating || isCaseOwnerUpdating || canEditCase.isCaseNotEditable }))));
|
|
252
255
|
}
|
|
253
256
|
export { OwnerSelector };
|
package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActiveCustomerEscalation.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,wBAAwB,+
|
|
1
|
+
{"version":3,"file":"ActiveCustomerEscalation.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,wBAAwB,+EAgJnC,CAAC"}
|
package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js
CHANGED
|
@@ -59,7 +59,7 @@ export const ActiveCustomerEscalation = forwardRef((props, ref) => {
|
|
|
59
59
|
React.createElement(ListItem, null, t('Needs a senior resource.')),
|
|
60
60
|
React.createElement(ListItem, null, t('Is more severe or should be a higher priority.'))),
|
|
61
61
|
commonElements,
|
|
62
|
-
React.createElement(Button, { variant: ButtonVariant.secondary, onClick: toggleModal, "data-tracking-id": "request-rme-trigger", "aria-label": t('Request an escalation') }, t('Request an escalation'))))));
|
|
62
|
+
React.createElement(Button, { variant: ButtonVariant.secondary, onClick: toggleModal, "data-tracking-id": "request-rme-trigger", "aria-label": t('Request an escalation'), isDisabled: canEditCase.isCaseNotEditable }, t('Request an escalation'))))));
|
|
63
63
|
return (React.createElement(React.Fragment, null,
|
|
64
64
|
React.createElement(RequestEscalationModal, { caseNumber: props.caseNumber, severity: props.caseSeverity, caseStatus: props.caseStatus, show: openRequestEscalationModal, onClose: toggleModal }),
|
|
65
65
|
React.createElement(Can, { do: resourceActions.CREATE, on: resources.ICE_ESCALATION, passThrough: true }, (canCreateICE) => canCreateICE || isInternal ? isInternalElements : isCreateRMEVisible ? isNotInternalElements : null)));
|
|
@@ -101,7 +101,7 @@ export function RequestEscalationModal(props) {
|
|
|
101
101
|
Subject: formState.subject,
|
|
102
102
|
Description: serializedDescription,
|
|
103
103
|
Status: 'In Progress',
|
|
104
|
-
Origin: 'Portal
|
|
104
|
+
Origin: 'Portal RME',
|
|
105
105
|
Priority: props.severity || '3 (Medium)',
|
|
106
106
|
Type: 'RME',
|
|
107
107
|
RecordTypeId: '012Ek00000JUtx5IAD',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArchivedCaseBanner.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/ArchivedCaseBanner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,uBAAuB;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,kBAAkB,CAAC,EAAE,UAAU,EAAE,EAAE,uBAAuB,qBAmBzE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Alert, AlertVariant } from '@patternfly/react-core';
|
|
2
|
+
import { isCaseArchivedStatus } from '@rh-support/utils';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Trans } from 'react-i18next';
|
|
5
|
+
export function ArchivedCaseBanner({ caseStatus }) {
|
|
6
|
+
if (!isCaseArchivedStatus(caseStatus)) {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
return (React.createElement(Alert, { className: "pf-v6-u-mb-md", isInline: true, variant: AlertVariant.info, title: React.createElement(Trans, null,
|
|
10
|
+
"This case is archived and read-only. If you need further assistance,",
|
|
11
|
+
' ',
|
|
12
|
+
React.createElement("a", { href: "/support/contact/" }, "contact us"),
|
|
13
|
+
" or",
|
|
14
|
+
' ',
|
|
15
|
+
React.createElement("a", { href: "/support/cases/#/troubleshoot" }, "open a new case"),
|
|
16
|
+
".") }));
|
|
17
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Case.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/Case.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Case.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/Case.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAS,mBAAmB,EAAiD,MAAM,kBAAkB,CAAC;AAoB7G,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,MAAM,qBA2QzC"}
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { useApolloClient } from '@apollo/client/react';
|
|
11
11
|
import { CoverSpinner, ErrorBoundary, OverviewContentLoader, ToastNotification, useDocumentTitle, usePrevious, } from '@rh-support/components';
|
|
12
|
-
import { fetchCaseDetails, GlobalMetadataStateContext, HostnameAwarenessModal } from '@rh-support/react-context';
|
|
12
|
+
import { CaseStatusProvider, fetchCaseDetails, GlobalMetadataStateContext, HostnameAwarenessModal, } from '@rh-support/react-context';
|
|
13
13
|
import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
14
14
|
import { getUrlParsedParams, isValidCaseNumber } from '@rh-support/utils';
|
|
15
15
|
import isEmpty from 'lodash/isEmpty';
|
|
@@ -25,6 +25,7 @@ import { fetchAttachments, fetchCaseEscalations,
|
|
|
25
25
|
// fetchFeedbacks,
|
|
26
26
|
} from '../../reducers/CaseDetailsPageReducer';
|
|
27
27
|
import { setCaseAccountNumber } from '../../reducers/CaseReducer';
|
|
28
|
+
import { ArchivedCaseBanner } from './ArchivedCaseBanner';
|
|
28
29
|
import { CaseDetailsAside } from './CaseDetailsAside';
|
|
29
30
|
import { CaseDetailsErrorMessage } from './CaseDetailsErrorMessage';
|
|
30
31
|
import CaseDetailsModals from './CaseDetailsModals';
|
|
@@ -57,8 +58,9 @@ export default function Case(props) {
|
|
|
57
58
|
// TODO: Re-enable after GraphQL migration of attachments
|
|
58
59
|
const canSeeAttachments = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_SEE_ATTACHMENTS);
|
|
59
60
|
const canSeeRMEs = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_RMES);
|
|
60
|
-
const { product, isFetchingCaseDetails, isFetchingCaseDetailsError, caseDetailsError, selectedAccountDetails } = useCaseSelector((state) => ({
|
|
61
|
+
const { product, status, isFetchingCaseDetails, isFetchingCaseDetailsError, caseDetailsError, selectedAccountDetails, } = useCaseSelector((state) => ({
|
|
61
62
|
product: state.caseDetails.product,
|
|
63
|
+
status: state.caseDetails.status,
|
|
62
64
|
isFetchingCaseDetails: state.isFetchingCaseDetails,
|
|
63
65
|
isFetchingCaseDetailsError: state.isFetchingCaseDetailsError,
|
|
64
66
|
caseDetailsError: state.caseDetailsError,
|
|
@@ -166,22 +168,24 @@ export default function Case(props) {
|
|
|
166
168
|
]);
|
|
167
169
|
return (React.createElement(React.Fragment, null,
|
|
168
170
|
isExportingPDF && React.createElement(CoverSpinner, null),
|
|
169
|
-
React.createElement(
|
|
170
|
-
React.createElement("div", {
|
|
171
|
-
React.createElement("
|
|
172
|
-
React.createElement("
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
171
|
+
React.createElement(CaseStatusProvider, { caseStatus: status },
|
|
172
|
+
React.createElement("div", { id: "rh-support-case" },
|
|
173
|
+
React.createElement("div", { className: "support-grid-case-details support-case" }, isFetchingCaseDetails && !isFetchingCaseDetailsError ? (React.createElement(OverviewContentLoader, null)) : (React.createElement(React.Fragment, null,
|
|
174
|
+
React.createElement("article", { className: "grid-main" },
|
|
175
|
+
React.createElement("section", { className: "grid-main-section" },
|
|
176
|
+
(isFetchingCaseDetailsError || !canReadCase || !canManageCase) && (React.createElement(CaseDetailsErrorMessage, { isError: isFetchingCaseDetailsError, errorDetails: caseDetailsError, canReadCase: canReadCase, canManageCase: canManageCase, caseNumber: caseNumber, isInlineError: true })),
|
|
177
|
+
canReadCase &&
|
|
178
|
+
(!isFetchingCaseDetails || !isEmpty(product)) &&
|
|
179
|
+
!isFetchingCaseDetailsError && (React.createElement(React.Fragment, null,
|
|
180
|
+
React.createElement(ArchivedCaseBanner, { caseStatus: status }),
|
|
181
|
+
React.createElement(ErrorBoundary, { errorMsgInfo: {
|
|
182
|
+
message: t('There was an error loading cases. Please try refreshing the page.'),
|
|
183
|
+
} },
|
|
184
|
+
React.createElement(CaseOverview, { caseNumber: caseNumber, tabsRef: caseDetailsTabsRef })),
|
|
185
|
+
React.createElement(Switch, null,
|
|
186
|
+
React.createElement(Route, { path: `${path}/:activeTab?` },
|
|
187
|
+
React.createElement(CaseDetailsTabs, { basePath: url, caseNumber: caseNumber, routeProps: props.routeProps, tabdRef: caseDetailsTabsRef }))))))),
|
|
188
|
+
!isFetchingCaseDetailsError && canReadCase && canManageCase && (React.createElement(CaseDetailsAside, { caseNumber: caseNumber })),
|
|
189
|
+
React.createElement(CaseDetailsModals, { caseNumber: caseNumber, isSecureSupport: loggedInUsersAccount.data.secureSupport, loggedInUserRights: loggedInUserRights })))))),
|
|
186
190
|
React.createElement(HostnameAwarenessModal, null)));
|
|
187
191
|
}
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { SingleSelectDropdown, ValueChangedIcon } from '@rh-support/components';
|
|
11
|
-
import { mapSfdcStatusToPortalStatus,
|
|
11
|
+
import { mapSfdcStatusToPortalStatus, PORTAL_USER_SELECTABLE_STATUSES } from '@rh-support/utils';
|
|
12
12
|
import isEmpty from 'lodash/isEmpty';
|
|
13
13
|
import map from 'lodash/map';
|
|
14
14
|
import React, { useContext, useMemo, useState } from 'react';
|
|
@@ -39,7 +39,7 @@ function CaseStatus(props) {
|
|
|
39
39
|
setLocalStatusChange(true);
|
|
40
40
|
validateCaseStatus(option);
|
|
41
41
|
});
|
|
42
|
-
const getDropdownOptions = map(
|
|
42
|
+
const getDropdownOptions = map(PORTAL_USER_SELECTABLE_STATUSES, (option) => ({
|
|
43
43
|
label: option,
|
|
44
44
|
value: option,
|
|
45
45
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/index.tsx"],"names":[],"mappings":"AAmCA,OAAO,KAAkD,MAAM,OAAO,CAAC;AA4BvE,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,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/index.tsx"],"names":[],"mappings":"AAmCA,OAAO,KAAkD,MAAM,OAAO,CAAC;AA4BvE,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,qBAsjBjD"}
|
|
@@ -156,7 +156,7 @@ export default function CaseOverview(props) {
|
|
|
156
156
|
caseUpdateError.showError(e, t('Severity failed to update'));
|
|
157
157
|
}
|
|
158
158
|
});
|
|
159
|
-
const updateStatusState = (
|
|
159
|
+
const updateStatusState = (statusVal, reopenedAt, reopenedBySSOName, reopenedReason, reopenedReasonOther, onStatusUpdate) => __awaiter(this, void 0, void 0, function* () {
|
|
160
160
|
setStatusUpdating(caseOverviewDispatch, true);
|
|
161
161
|
let updateStatusObj = {
|
|
162
162
|
status: statusVal,
|
|
@@ -170,10 +170,12 @@ export default function CaseOverview(props) {
|
|
|
170
170
|
setStatusUpdating(caseOverviewDispatch, false);
|
|
171
171
|
onStatusUpdate && (yield onStatusUpdate());
|
|
172
172
|
ToastNotification.addSuccessMessage(t('Status has been successfully updated'));
|
|
173
|
+
return true;
|
|
173
174
|
}
|
|
174
175
|
catch (e) {
|
|
175
176
|
setStatusUpdating(caseOverviewDispatch, false);
|
|
176
|
-
caseUpdateError.showError(e, t('Status failed to update'));
|
|
177
|
+
caseUpdateError.showError(e, t('Status failed to update, try refreshing the page. Please contact us if the problem persists.'));
|
|
178
|
+
return false;
|
|
177
179
|
}
|
|
178
180
|
});
|
|
179
181
|
const onStatusChange = (newPortalStatus) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -237,6 +239,7 @@ export default function CaseOverview(props) {
|
|
|
237
239
|
React.createElement(ExternalLinkAltIcon, null))));
|
|
238
240
|
};
|
|
239
241
|
const portalStatus = mapSfdcStatusToPortalStatus(status);
|
|
242
|
+
const isCaseClosed = portalStatus === 'Closed';
|
|
240
243
|
const isCaseInOpenState = portalStatus !== 'Closed' && portalStatus !== 'Archived';
|
|
241
244
|
// To switch from old case type to new support type
|
|
242
245
|
const newCaseTypesArray = toNewCaseTypeMapper(allCaseTypes.data).sort();
|
|
@@ -262,13 +265,20 @@ export default function CaseOverview(props) {
|
|
|
262
265
|
props.caseNumber),
|
|
263
266
|
React.createElement("div", null,
|
|
264
267
|
exportPDFButton(props.caseNumber),
|
|
265
|
-
React.createElement(Button, Object.assign({ className: `pf-v6-u-ml-md ${isExportingPDF ? 'hide-in-pdf' : ''}`, isDisabled: !canManageCase }, ((showCloseCaseModal || showReOpenCaseModal) &&
|
|
268
|
+
!canEditCase.isCaseArchived && (React.createElement(Button, Object.assign({ className: `pf-v6-u-ml-md ${isExportingPDF ? 'hide-in-pdf' : ''}`, isDisabled: !canManageCase }, ((showCloseCaseModal || showReOpenCaseModal) &&
|
|
266
269
|
isCaseUpdating && {
|
|
267
270
|
isLoading: true,
|
|
268
271
|
}), { onClick: () => (isCaseInOpenState ? onCaseClose() : onCaseReopen()), variant: isCaseInOpenState ? ButtonVariant.secondary : ButtonVariant.tertiary, "data-tracking-id": isCaseInOpenState
|
|
269
272
|
? 'case-close-btn-case-details-overview'
|
|
270
273
|
: 'case-reopen-btn-case-details-overview' }),
|
|
271
|
-
React.createElement(Trans, null, isCaseInOpenState ? 'Close case' : 'Reopen case')))
|
|
274
|
+
React.createElement(Trans, null, isCaseInOpenState ? 'Close case' : 'Reopen case'))),
|
|
275
|
+
(isCaseInOpenState || isCaseClosed) && (React.createElement(Button, Object.assign({ className: `pf-v6-u-ml-md ${isExportingPDF ? 'hide-in-pdf' : ''}`, isDisabled: !canManageCase }, ((showCloseCaseModal || showReOpenCaseModal) &&
|
|
276
|
+
isCaseUpdating && {
|
|
277
|
+
isLoading: true,
|
|
278
|
+
}), { onClick: () => (isCaseInOpenState ? onCaseClose() : onCaseReopen()), variant: isCaseInOpenState ? ButtonVariant.secondary : ButtonVariant.tertiary, "data-tracking-id": isCaseInOpenState
|
|
279
|
+
? 'case-close-btn-case-details-overview'
|
|
280
|
+
: 'case-reopen-btn-case-details-overview' }),
|
|
281
|
+
React.createElement(Trans, null, isCaseInOpenState ? 'Close case' : 'Reopen case'))))),
|
|
272
282
|
React.createElement("div", { className: `case-details-header-secondary push-bottom-narrow pf-v6-u-mb-sm ${isExportingPDF && !viewAsCustomer ? 'hide-in-pdf' : ''}` },
|
|
273
283
|
React.createElement("span", { className: `case-support-level ${isExportingPDF ? 'hide-in-pdf' : ''}` }, computeSupportLink())),
|
|
274
284
|
React.createElement("div", { className: "case-details-summary push-bottom-narrow" },
|
|
@@ -308,18 +318,23 @@ export default function CaseOverview(props) {
|
|
|
308
318
|
React.createElement("div", { className: "case-overview-secondary card card-md card-light push-bottom" },
|
|
309
319
|
React.createElement("div", { className: "pf-v6-l-grid pf-m-gutter pf-m-all-4-col-on-lg" },
|
|
310
320
|
React.createElement("div", { className: "form-wrapper" },
|
|
311
|
-
React.createElement(CaseStatus, { selectedStatus: status, onStatusChange: onStatusChange, isDisabled: !canManageCase || allCaseStatuses.isFetching, isFetching: caseOverviewState.caseStatusUpdating && isCaseUpdating, hasError: allCaseStatuses.isError })),
|
|
321
|
+
React.createElement(CaseStatus, { selectedStatus: status, onStatusChange: onStatusChange, isDisabled: !canManageCase || allCaseStatuses.isFetching || canEditCase.isCaseNotEditable, isFetching: caseOverviewState.caseStatusUpdating && isCaseUpdating, hasError: allCaseStatuses.isError })),
|
|
312
322
|
React.createElement("div", { className: "form-wrapper" },
|
|
313
|
-
React.createElement(CaseType, { selectedType: switchedCaseType, onTypeChange: onTypeChange, isDisabled: !canManageCase ||
|
|
323
|
+
React.createElement(CaseType, { selectedType: switchedCaseType, onTypeChange: onTypeChange, isDisabled: !canManageCase ||
|
|
324
|
+
allCaseTypes.isFetching ||
|
|
325
|
+
isCaseUpdating ||
|
|
326
|
+
canEditCase.isCaseNotEditable, allTypes: newCaseTypesArray, isFetching: caseOverviewState.caseTypeUpdating && isCaseUpdating, hasError: allCaseTypes.isError })),
|
|
314
327
|
React.createElement("div", { className: "form-wrapper" },
|
|
315
|
-
React.createElement(Severity, { onSeverityChange: onSeverityChange, isDisabled: !canManageCase, isFetching: caseOverviewState.caseSeverityUpdating && isCaseUpdating })))),
|
|
328
|
+
React.createElement(Severity, { onSeverityChange: onSeverityChange, isDisabled: !canManageCase || canEditCase.isCaseNotEditable, isFetching: caseOverviewState.caseSeverityUpdating && isCaseUpdating })))),
|
|
316
329
|
React.createElement(ExpandableSection, { className: "case-details-main", toggleText: t('Case information'), isExpanded: isDetailsExpanded, onToggle: onToggleDetails },
|
|
317
330
|
React.createElement(CaseInformation, null))),
|
|
318
331
|
showCloseCaseModal && (React.createElement(CloseCaseModal, { onConfirm: (commentBody) => __awaiter(this, void 0, void 0, function* () {
|
|
319
|
-
yield updateStatusState(CaseStatusEnum.CLOSED);
|
|
320
|
-
|
|
332
|
+
const success = yield updateStatusState(CaseStatusEnum.CLOSED);
|
|
333
|
+
if (success) {
|
|
334
|
+
yield postCommentAfterStatusUpdate(commentBody);
|
|
335
|
+
dtmTrackEventCaseStepEncountered('close', caseNumber, product, version);
|
|
336
|
+
}
|
|
321
337
|
setShowCaseCloseModal(false);
|
|
322
|
-
dtmTrackEventCaseStepEncountered('close', caseNumber, product, version);
|
|
323
338
|
}), isUpdating: (caseOverviewState.caseStatusUpdating && isCaseUpdating) || isPostingComment, onClose: () => {
|
|
324
339
|
setShowCaseCloseModal(false);
|
|
325
340
|
}, caseNumber: caseNumber })),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseSolutions.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseSolutions/CaseSolutions.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAwF3E,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB,EAAE,OAAO,CAAC;CACnC;AAUD,eAAO,MAAM,aAAa,+
|
|
1
|
+
{"version":3,"file":"CaseSolutions.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseSolutions/CaseSolutions.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAwF3E,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB,EAAE,OAAO,CAAC;CACnC;AAUD,eAAO,MAAM,aAAa,+EAshBxB,CAAC"}
|
|
@@ -161,7 +161,7 @@ export const CaseSolutions = forwardRef((props, ref) => {
|
|
|
161
161
|
setIsCloseCaseModalOpen(false);
|
|
162
162
|
}
|
|
163
163
|
catch (err) {
|
|
164
|
-
caseUpdateError.showError(err, t('Status failed to update'));
|
|
164
|
+
caseUpdateError.showError(err, t('Status failed to update, try refreshing the page. Please contact us if the problem persists.'));
|
|
165
165
|
}
|
|
166
166
|
finally {
|
|
167
167
|
setIsCaseCloseLoading(false);
|
|
@@ -281,7 +281,7 @@ export function CaseContactPhoneNumber() {
|
|
|
281
281
|
isCasePhoneUpdating, style: { display: isExportingPDF ? 'none' : '' } },
|
|
282
282
|
React.createElement(CheckIcon, null)),
|
|
283
283
|
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' : '' }, disabled: isCaseOwnerUpdating || isCasePhoneUpdating, "aria-label": "Clear" },
|
|
284
|
-
React.createElement(TimesIcon, { color: "#6A6E73" })))) : (React.createElement("button", { className: "btn btn-app btn-link", type: "button", onClick: () => setIsEditting(true), "data-tracking-id": "case-details-page-supplied-phone-edit", style: { display: isExportingPDF ? 'none' : '' }, "aria-label": "Edit", disabled: isCaseOwnerUpdating || isCasePhoneUpdating },
|
|
284
|
+
React.createElement(TimesIcon, { color: "#6A6E73" })))) : (React.createElement("button", { className: "btn btn-app btn-link", type: "button", onClick: () => setIsEditting(true), "data-tracking-id": "case-details-page-supplied-phone-edit", style: { display: isExportingPDF ? 'none' : '' }, "aria-label": "Edit", disabled: isCaseOwnerUpdating || isCasePhoneUpdating || canEditCase.isCaseNotEditable },
|
|
285
285
|
React.createElement(PencilAltIcon, null)))),
|
|
286
286
|
!invalid &&
|
|
287
287
|
(localFullPhone === null || localFullPhone === void 0 ? void 0 : localFullPhone.length) <= PHONE_LIMIT &&
|
|
@@ -111,7 +111,7 @@ function CaseHostname(props) {
|
|
|
111
111
|
React.createElement(InlineEdit, { labelProps: { htmlFor: 'case-details-hostname' }, formClassName: props.className || '', labelContent: React.createElement(React.Fragment, null,
|
|
112
112
|
React.createElement(Trans, { className: "pf-v6-u-mr-xs" }, "Hostname"),
|
|
113
113
|
React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localHostnameChange, value: hostname, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.hostname) })), helperContent: !isExportingPDF ? (React.createElement(Popover, { "aria-label": "Hostname Info", position: PopoverPosition.auto, bodyContent: hostNameVisibilityContent, closeBtnAriaLabel: "Close", headerContent: 'Share hostname?', onShow: () => userOriginalHostnameValue() },
|
|
114
|
-
React.createElement(QuestionCircleIcon, { className: "pf-v6-u-ml-sm F icon-size cursor-pointer", "aria-label": "Hostname Info", color: "#5e40be" }))) : undefined, allowInlineEdit: props.inlineEditable, content: hostname, saveDisabled: hostnameState === hostname || isHostnameUpdating || lengthError, onSave: onSave, onCancel: onCancel, initialIsEditing: false, loadingIndicator: isHostnameUpdating ? React.createElement(LoadingIndicator, { show: isHostnameUpdating, isInline: true }) : undefined, isExportingPDF: isExportingPDF },
|
|
114
|
+
React.createElement(QuestionCircleIcon, { className: "pf-v6-u-ml-sm F icon-size cursor-pointer", "aria-label": "Hostname Info", color: "#5e40be" }))) : undefined, allowInlineEdit: props.inlineEditable && !canEditCase.isCaseNotEditable, content: hostname, saveDisabled: hostnameState === hostname || isHostnameUpdating || lengthError, onSave: onSave, onCancel: onCancel, initialIsEditing: false, loadingIndicator: isHostnameUpdating ? React.createElement(LoadingIndicator, { show: isHostnameUpdating, isInline: true }) : undefined, isExportingPDF: isExportingPDF },
|
|
115
115
|
React.createElement(TextInput, { type: "text", id: "case-details-hostname", className: `${lengthError ? ' form-invalid' : ''}`, name: "case-details-hostname", value: hostnameState, onChange: (e, phone) => onHostnameChange(phone), isDisabled: isHostnameUpdating, "data-tracking-id": "case-details-hostname", "aria-invalid": lengthError })),
|
|
116
116
|
lengthError && (React.createElement("div", { className: "pull-top" },
|
|
117
117
|
React.createElement("p", { className: "form-instructions form-invalid" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseInternalStatus.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseInternalStatus.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAQpE,MAAM,CAAC,OAAO,UAAU,kBAAkB,sBA0FzC"}
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { Flex, FlexItem, MenuToggle, Select, SelectList, SelectOption, Spinner, } from '@patternfly/react-core';
|
|
11
11
|
import { ToastNotification } from '@rh-support/components';
|
|
12
|
-
import { fetchInternalStatusMetadata, GlobalMetadataDispatchContext, GlobalMetadataStateContext, } from '@rh-support/react-context';
|
|
12
|
+
import { fetchInternalStatusMetadata, GlobalMetadataDispatchContext, GlobalMetadataStateContext, useCanEditCase, } from '@rh-support/react-context';
|
|
13
13
|
import { haventLoadedMetadata } from '@rh-support/utils';
|
|
14
14
|
import React, { useContext, useEffect, useState } from 'react';
|
|
15
15
|
import { Trans, useTranslation } from 'react-i18next';
|
|
@@ -20,6 +20,7 @@ import { updateCaseDetails } from '../../../../reducers/CaseReducer';
|
|
|
20
20
|
export default function CaseInternalStatus() {
|
|
21
21
|
const { t } = useTranslation();
|
|
22
22
|
const caseUpdateError = useCaseUpdateErrorMessage();
|
|
23
|
+
const canEditCase = useCanEditCase();
|
|
23
24
|
const { internalStatus, caseNumber } = useCaseSelector((state) => ({
|
|
24
25
|
internalStatus: state.caseDetails.internalStatus,
|
|
25
26
|
caseNumber: state.caseDetails.caseNumber,
|
|
@@ -34,7 +35,7 @@ export default function CaseInternalStatus() {
|
|
|
34
35
|
e.stopPropagation();
|
|
35
36
|
setIsOpen(!isOpen);
|
|
36
37
|
};
|
|
37
|
-
const toggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, onClick: onToggleClick, isExpanded: isOpen, isDisabled: isIStatusUpdating, isFullWidth: true, className: "case-internal-status-selector-text" },
|
|
38
|
+
const toggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, onClick: onToggleClick, isExpanded: isOpen, isDisabled: isIStatusUpdating || canEditCase.isCaseNotEditable, isFullWidth: true, className: "case-internal-status-selector-text" },
|
|
38
39
|
React.createElement(Flex, { justifyContent: { default: 'justifyContentSpaceBetween' } },
|
|
39
40
|
React.createElement(FlexItem, null,
|
|
40
41
|
" ",
|
|
@@ -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":"AAYA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAqBxE,wBAAgB,sBAAsB,sBAiZrC"}
|