@rh-support/troubleshoot 2.6.335 → 2.6.337
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/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/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +24 -12
- 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 +5 -3
- 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/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +5 -2
- package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseGroup.js +20 -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/Review/Review.d.ts.map +1 -1
- package/lib/esm/components/Review/Review.js +4 -0
- package/lib/esm/hooks/useAB.d.ts.map +1 -1
- package/lib/esm/hooks/useAB.js +23 -45
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +18 -22
- package/package.json +6 -6
|
@@ -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)));
|
|
@@ -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
|
}
|
|
@@ -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,qBAujBjD"}
|
|
@@ -156,7 +156,10 @@ export default function CaseOverview(props) {
|
|
|
156
156
|
caseUpdateError.showError(e, t('Severity failed to update'));
|
|
157
157
|
}
|
|
158
158
|
});
|
|
159
|
-
const
|
|
159
|
+
const showStatusUpdateSuccessToast = () => {
|
|
160
|
+
ToastNotification.addSuccessMessage(t('Status has been successfully updated'));
|
|
161
|
+
};
|
|
162
|
+
const updateStatusState = (statusVal, reopenedAt, reopenedBySSOName, reopenedReason, reopenedReasonOther, onStatusUpdate, options) => __awaiter(this, void 0, void 0, function* () {
|
|
160
163
|
setStatusUpdating(caseOverviewDispatch, true);
|
|
161
164
|
let updateStatusObj = {
|
|
162
165
|
status: statusVal,
|
|
@@ -169,7 +172,9 @@ export default function CaseOverview(props) {
|
|
|
169
172
|
yield updateOverviewCaseDetails(updateStatusObj);
|
|
170
173
|
setStatusUpdating(caseOverviewDispatch, false);
|
|
171
174
|
onStatusUpdate && (yield onStatusUpdate());
|
|
172
|
-
|
|
175
|
+
if ((options === null || options === void 0 ? void 0 : options.showSuccessToast) !== false) {
|
|
176
|
+
showStatusUpdateSuccessToast();
|
|
177
|
+
}
|
|
173
178
|
return true;
|
|
174
179
|
}
|
|
175
180
|
catch (e) {
|
|
@@ -239,8 +244,8 @@ export default function CaseOverview(props) {
|
|
|
239
244
|
React.createElement(ExternalLinkAltIcon, null))));
|
|
240
245
|
};
|
|
241
246
|
const portalStatus = mapSfdcStatusToPortalStatus(status);
|
|
247
|
+
const isCaseClosed = portalStatus === 'Closed';
|
|
242
248
|
const isCaseInOpenState = portalStatus !== 'Closed' && portalStatus !== 'Archived';
|
|
243
|
-
const isCaseArchived = portalStatus === 'Archived';
|
|
244
249
|
// To switch from old case type to new support type
|
|
245
250
|
const newCaseTypesArray = toNewCaseTypeMapper(allCaseTypes.data).sort();
|
|
246
251
|
return (React.createElement(React.Fragment, null,
|
|
@@ -265,7 +270,7 @@ export default function CaseOverview(props) {
|
|
|
265
270
|
props.caseNumber),
|
|
266
271
|
React.createElement("div", null,
|
|
267
272
|
exportPDFButton(props.caseNumber),
|
|
268
|
-
|
|
273
|
+
(isCaseInOpenState || isCaseClosed) && (React.createElement(Button, Object.assign({ className: `pf-v6-u-ml-md ${isExportingPDF ? 'hide-in-pdf' : ''}`, isDisabled: !canManageCase }, ((showCloseCaseModal || showReOpenCaseModal) &&
|
|
269
274
|
isCaseUpdating && {
|
|
270
275
|
isLoading: true,
|
|
271
276
|
}), { onClick: () => (isCaseInOpenState ? onCaseClose() : onCaseReopen()), variant: isCaseInOpenState ? ButtonVariant.secondary : ButtonVariant.tertiary, "data-tracking-id": isCaseInOpenState
|
|
@@ -311,30 +316,37 @@ export default function CaseOverview(props) {
|
|
|
311
316
|
React.createElement("div", { className: "case-overview-secondary card card-md card-light push-bottom" },
|
|
312
317
|
React.createElement("div", { className: "pf-v6-l-grid pf-m-gutter pf-m-all-4-col-on-lg" },
|
|
313
318
|
React.createElement("div", { className: "form-wrapper" },
|
|
314
|
-
React.createElement(CaseStatus, { selectedStatus: status, onStatusChange: onStatusChange, isDisabled: !canManageCase || allCaseStatuses.isFetching ||
|
|
319
|
+
React.createElement(CaseStatus, { selectedStatus: status, onStatusChange: onStatusChange, isDisabled: !canManageCase || allCaseStatuses.isFetching || canEditCase.isCaseNotEditable, isFetching: caseOverviewState.caseStatusUpdating && isCaseUpdating, hasError: allCaseStatuses.isError })),
|
|
315
320
|
React.createElement("div", { className: "form-wrapper" },
|
|
316
|
-
React.createElement(CaseType, { selectedType: switchedCaseType, onTypeChange: onTypeChange, isDisabled: !canManageCase ||
|
|
321
|
+
React.createElement(CaseType, { selectedType: switchedCaseType, onTypeChange: onTypeChange, isDisabled: !canManageCase ||
|
|
322
|
+
allCaseTypes.isFetching ||
|
|
323
|
+
isCaseUpdating ||
|
|
324
|
+
canEditCase.isCaseNotEditable, allTypes: newCaseTypesArray, isFetching: caseOverviewState.caseTypeUpdating && isCaseUpdating, hasError: allCaseTypes.isError })),
|
|
317
325
|
React.createElement("div", { className: "form-wrapper" },
|
|
318
|
-
React.createElement(Severity, { onSeverityChange: onSeverityChange, isDisabled: !canManageCase, isFetching: caseOverviewState.caseSeverityUpdating && isCaseUpdating })))),
|
|
326
|
+
React.createElement(Severity, { onSeverityChange: onSeverityChange, isDisabled: !canManageCase || canEditCase.isCaseNotEditable, isFetching: caseOverviewState.caseSeverityUpdating && isCaseUpdating })))),
|
|
319
327
|
React.createElement(ExpandableSection, { className: "case-details-main", toggleText: t('Case information'), isExpanded: isDetailsExpanded, onToggle: onToggleDetails },
|
|
320
328
|
React.createElement(CaseInformation, null))),
|
|
321
329
|
showCloseCaseModal && (React.createElement(CloseCaseModal, { onConfirm: (commentBody) => __awaiter(this, void 0, void 0, function* () {
|
|
322
|
-
const success = yield updateStatusState(CaseStatusEnum.CLOSED);
|
|
330
|
+
const success = yield updateStatusState(CaseStatusEnum.CLOSED, undefined, undefined, undefined, undefined, null, { showSuccessToast: false });
|
|
323
331
|
if (success) {
|
|
332
|
+
setShowCaseCloseModal(false);
|
|
324
333
|
yield postCommentAfterStatusUpdate(commentBody);
|
|
325
334
|
dtmTrackEventCaseStepEncountered('close', caseNumber, product, version);
|
|
335
|
+
showStatusUpdateSuccessToast();
|
|
326
336
|
}
|
|
327
|
-
setShowCaseCloseModal(false);
|
|
328
337
|
}), isUpdating: (caseOverviewState.caseStatusUpdating && isCaseUpdating) || isPostingComment, onClose: () => {
|
|
329
338
|
setShowCaseCloseModal(false);
|
|
330
339
|
}, caseNumber: caseNumber })),
|
|
331
340
|
showReOpenCaseModal && (React.createElement(ReopenCaseModal, { isInternal: loggedInUserRights.data.isInternal(), onConfirm: (commentBody, newPortalStatus, reopenedAt, reopenedBySSOName, reopenedReason, reopenedReasonOther) => __awaiter(this, void 0, void 0, function* () {
|
|
332
341
|
const newApiStatus = resolvePortalStatusToApiValue(newPortalStatus, status);
|
|
333
|
-
yield updateStatusState(newApiStatus, reopenedAt || null, reopenedBySSOName || null, reopenedReason || null, reopenedReasonOther || null, () => __awaiter(this, void 0, void 0, function* () {
|
|
342
|
+
const success = yield updateStatusState(newApiStatus, reopenedAt || null, reopenedBySSOName || null, reopenedReason || null, reopenedReasonOther || null, () => __awaiter(this, void 0, void 0, function* () {
|
|
334
343
|
yield postCommentAfterStatusUpdate(commentBody);
|
|
335
344
|
dtmTrackEventCaseStepEncountered('reopen', caseNumber, product, version);
|
|
336
|
-
}));
|
|
337
|
-
|
|
345
|
+
}), { showSuccessToast: false });
|
|
346
|
+
if (success) {
|
|
347
|
+
setShowReopenCaseModal(false);
|
|
348
|
+
showStatusUpdateSuccessToast();
|
|
349
|
+
}
|
|
338
350
|
}), onClose: () => {
|
|
339
351
|
setShowReopenCaseModal(false);
|
|
340
352
|
}, caseNumber: caseNumber, reopenStatus: reopenStatusRef.current, isUpdating: (caseOverviewState.caseStatusUpdating && isCaseUpdating) || isPostingComment, whoIsUpdating: updatingUser }))));
|
|
@@ -157,8 +157,8 @@ export const CaseSolutions = forwardRef((props, ref) => {
|
|
|
157
157
|
updateDiscussionState: true,
|
|
158
158
|
doNotChangeStatus: true,
|
|
159
159
|
});
|
|
160
|
-
ToastNotification.addSuccessMessage(t('Status has been successfully updated'));
|
|
161
160
|
setIsCloseCaseModalOpen(false);
|
|
161
|
+
ToastNotification.addSuccessMessage(t('Status has been successfully updated'));
|
|
162
162
|
}
|
|
163
163
|
catch (err) {
|
|
164
164
|
caseUpdateError.showError(err, t('Status failed to update, try refreshing the page. Please contact us if the problem persists.'));
|
|
@@ -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":"AAYA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAqBxE,wBAAgB,sBAAsB,
|
|
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"}
|
|
@@ -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 { LoadingIndicator, ToastNotification, usePrevious } from '@rh-support/components';
|
|
12
|
-
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
12
|
+
import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
|
|
13
13
|
import { extractNoClusterIdFieldsFromAdditionalCaseInformation, getVersion, hasNoClusterIdFieldsInAdditionalCaseInformation, } from '@rh-support/utils';
|
|
14
14
|
import isEmpty from 'lodash/isEmpty';
|
|
15
15
|
import isEqual from 'lodash/isEqual';
|
|
@@ -41,6 +41,8 @@ export function CaseOpenshiftClusterId() {
|
|
|
41
41
|
isFetchingCaseDetails: state.isFetchingCaseDetails,
|
|
42
42
|
}), isEqual);
|
|
43
43
|
const caseDispatch = useCaseDispatch();
|
|
44
|
+
const canEditCase = useCanEditCase();
|
|
45
|
+
const isCaseReadOnly = canEditCase.isCaseNotEditable;
|
|
44
46
|
const { globalMetadataState: { loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
45
47
|
const majorVersion = (version && getVersion(version).major) || '';
|
|
46
48
|
const isOpenShiftV3 = product === 'OpenShift Container Platform' && majorVersion === '3';
|
|
@@ -319,8 +321,8 @@ export function CaseOpenshiftClusterId() {
|
|
|
319
321
|
clusterDropdownId === 'dont-have-id' ||
|
|
320
322
|
clusterDropdownId === 'v3-cluster'
|
|
321
323
|
? false
|
|
322
|
-
: isClusterIdInvalid, clusterIdDropdownFormInstructions: !isExportingPDF ? clusterIdDropdownFormInstructions() : undefined, onClusterClear: resetClusterData, isV3: product !== 'OpenShift Container Platform', isDisabled: isClusterIdUpdating, noClusterIdReasonExplanation: resolvedNoClusterIdReasonExplanation || '' }),
|
|
323
|
-
shouldShowNoClusterReasonSelector && (React.createElement(NoClusterIDReasonSelector, { noClusterIdReasonExplanation: resolvedNoClusterIdReasonExplanation || '', noClusterIdReason: resolvedNoClusterIdReason || '', onReasonInputBoxBlur: onReasonExplanationInputBoxChanged, onReasonChange: onReasonChange, isInValid: isInVaidNoClusterIdReason, isCustomer: isCustomer, isDisabled: isReasonUpdating })),
|
|
324
|
+
: isClusterIdInvalid, clusterIdDropdownFormInstructions: !isExportingPDF ? clusterIdDropdownFormInstructions() : undefined, onClusterClear: resetClusterData, isV3: product !== 'OpenShift Container Platform', isDisabled: isClusterIdUpdating || isCaseReadOnly, noClusterIdReasonExplanation: resolvedNoClusterIdReasonExplanation || '' }),
|
|
325
|
+
shouldShowNoClusterReasonSelector && (React.createElement(NoClusterIDReasonSelector, { noClusterIdReasonExplanation: resolvedNoClusterIdReasonExplanation || '', noClusterIdReason: resolvedNoClusterIdReason || '', onReasonInputBoxBlur: onReasonExplanationInputBoxChanged, onReasonChange: onReasonChange, isInValid: isInVaidNoClusterIdReason, isCustomer: isCustomer, isDisabled: isReasonUpdating || isCaseReadOnly })),
|
|
324
326
|
React.createElement(LoadingIndicator, { show: isClusterIdUpdating, size: "xs" })));
|
|
325
327
|
}
|
|
326
328
|
}
|
|
@@ -111,7 +111,7 @@ export default function CaseReferenceNumber(props) {
|
|
|
111
111
|
React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localRefNumberChange, value: referenceNumber, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.altID) }),
|
|
112
112
|
' ',
|
|
113
113
|
!isExportingPDF ? (React.createElement(Tooltip, { trigger: 'mouseenter focus', position: TooltipPosition.top, content: React.createElement(Trans, null, "Add your internal tracking ID to better identify and organize support issues.") },
|
|
114
|
-
React.createElement(InfoIcon, { className: "pf-v6-u-ml-sm cursor-pointer", "aria-label": "Case Alternate ID", color: "#5e40be" }))) : ('')), allowInlineEdit: inlineEditable, content: referenceNumber || t('No personal reference number to display.'), hideSaveCancel: hideSaveCancel, saveDisabled: saveDisabled, charCount: (referenceNumberState === null || referenceNumberState === void 0 ? void 0 : referenceNumberState.length) || 0, charTotal: CASE_REFERENCE_NUMBER_LIMIT, cancelToggleState: isCancelClicked, saveToggleState: isSaveClicked, isExportingPDF: isExportingPDF },
|
|
114
|
+
React.createElement(InfoIcon, { className: "pf-v6-u-ml-sm cursor-pointer", "aria-label": "Case Alternate ID", color: "#5e40be" }))) : ('')), allowInlineEdit: inlineEditable && !canEditCase.isCaseNotEditable, content: referenceNumber || t('No personal reference number to display.'), hideSaveCancel: hideSaveCancel, saveDisabled: saveDisabled, charCount: (referenceNumberState === null || referenceNumberState === void 0 ? void 0 : referenceNumberState.length) || 0, charTotal: CASE_REFERENCE_NUMBER_LIMIT, cancelToggleState: isCancelClicked, saveToggleState: isSaveClicked, isExportingPDF: isExportingPDF },
|
|
115
115
|
React.createElement(TextInputGroup, null,
|
|
116
116
|
React.createElement(TextInput, { value: referenceNumberState, type: "text", id: "case-details-reference-number", placeholder: t(`Enter the reference number used personally or within your company`), onChange: (_event, value) => onReferenceNumberChange(value), "data-tracking-id": "case-details-reference-number", isDisabled: isUpdating, onKeyDown: handleKeyDown, validated: (referenceNumberState === null || referenceNumberState === void 0 ? void 0 : referenceNumberState.length) > CASE_REFERENCE_NUMBER_LIMIT
|
|
117
117
|
? ValidatedOptions.error
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductVersion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/ProductVersion.tsx"],"names":[],"mappings":"AA0CA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAevE,UAAU,MAAM;IACZ,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACvC;AAED,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ProductVersion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/ProductVersion.tsx"],"names":[],"mappings":"AA0CA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAevE,UAAU,MAAM;IACZ,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACvC;AAED,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,qBA8arC;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -77,6 +77,7 @@ function ProductNVersion(props) {
|
|
|
77
77
|
(_a = textInputRef === null || textInputRef === void 0 ? void 0 : textInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
78
78
|
};
|
|
79
79
|
const canEditCase = useCanEditCase();
|
|
80
|
+
const isCaseReadOnly = canEditCase.isCaseNotEditable;
|
|
80
81
|
const { isExportingPDF } = useContext(PDFContext);
|
|
81
82
|
const onProductChange = (option) => __awaiter(this, void 0, void 0, function* () {
|
|
82
83
|
if (canEditCase.alert())
|
|
@@ -135,11 +136,7 @@ function ProductNVersion(props) {
|
|
|
135
136
|
const serviceLevels = !onlyVersionChanged
|
|
136
137
|
? resolveProductServiceLevelsForAccount(selectedAccountDetails.data, allProducts.data.productsResult, selectedProduct)
|
|
137
138
|
: undefined;
|
|
138
|
-
yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, caseNumber, Object.assign(
|
|
139
|
-
? { entitlementId: serviceLevels.defaultEntitlementId }
|
|
140
|
-
: {})), (!onlyVersionChanged && (serviceLevels === null || serviceLevels === void 0 ? void 0 : serviceLevels.entitlementSla)
|
|
141
|
-
? { entitlementSla: serviceLevels.entitlementSla }
|
|
142
|
-
: {})), false, { existingCaseDetails });
|
|
139
|
+
yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, caseNumber, Object.assign({ product: selectedProduct, version: selectedVersion }, (selectedVersionId ? { productId: selectedVersionId } : {})), false, { existingCaseDetails });
|
|
143
140
|
if (!onlyVersionChanged) {
|
|
144
141
|
const catalogProduct = getProductObj(allProducts.data.productsResult, selectedProduct);
|
|
145
142
|
if (catalogProduct.productId) {
|
|
@@ -253,7 +250,7 @@ function ProductNVersion(props) {
|
|
|
253
250
|
setIsOpen,
|
|
254
251
|
onSelect: onProductChange,
|
|
255
252
|
});
|
|
256
|
-
const toggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, variant: "typeahead", onClick: onToggleClick, isExpanded: isOpen, isFullWidth: true, isDisabled: isProductUpdating || (allProducts.isFetching && !allProducts.isError), status: isProductInvalid ? 'danger' : undefined },
|
|
253
|
+
const toggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, variant: "typeahead", onClick: onToggleClick, isExpanded: isOpen, isFullWidth: true, isDisabled: isProductUpdating || (allProducts.isFetching && !allProducts.isError) || isCaseReadOnly, status: isProductInvalid ? 'danger' : undefined },
|
|
257
254
|
React.createElement(TextInputGroup, { isPlain: true },
|
|
258
255
|
React.createElement(TextInputGroupMain, { value: inputValue, onClick: onToggleClick, onChange: onTextInputChange, onKeyDown: onInputKeyDown, autoComplete: "off", innerRef: textInputRef, placeholder: t('Select a product'), role: "combobox", isExpanded: isOpen, "aria-controls": "case-details-product-selector-listbox" }),
|
|
259
256
|
isProductUpdating ? (React.createElement(TextInputGroupUtilities, null,
|
|
@@ -290,6 +287,7 @@ function ProductNVersion(props) {
|
|
|
290
287
|
React.createElement(SingleSelectDropdown, { className: "open-case-version", id: "version-dropdown", placeholder: t(`Select a version`), selected: getVersionSelectedDropdownOption, options: getVersionDropdownOptions, isInvalid: checkIfVersionIsInvalid, isDisabled: isVersionUpdating ||
|
|
291
288
|
(allProducts.isFetching && !allProducts.isError) ||
|
|
292
289
|
isEmpty(selectedProductLocal) ||
|
|
293
|
-
isCaseUpdating
|
|
290
|
+
isCaseUpdating ||
|
|
291
|
+
isCaseReadOnly, onSelect: onVersionChange, isLoading: isVersionUpdating || versionsDetails.isFetching, dataTrackingId: "case-details-version-selector", isScrollable: true }))))));
|
|
294
292
|
}
|
|
295
293
|
export default ProductNVersion;
|
|
@@ -133,7 +133,7 @@ function Summary(props) {
|
|
|
133
133
|
React.createElement(NewInlineEdit, { labelProps: { htmlFor: 'case-details-summary' }, labelContent: React.createElement(React.Fragment, null,
|
|
134
134
|
React.createElement(Trans, null, "Title"),
|
|
135
135
|
React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localSummaryChange, value: summary, getTooltipContent: getSummaryChangedTT }),
|
|
136
|
-
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")), allowInlineEdit: props.inlineEditable, content: summary ? summary : t('No summary to display.'), saveDisabled: saveDisabled, hideLabel: props.hideLabel, hideSaveCancel: props.hideSaveCancel, charCount: (summaryState === null || summaryState === void 0 ? void 0 : summaryState.length) || 0, charTotal: SUMMARY_LENGTH_LIMIT, cancelToggleState: cancelToggleKey % 2 === 1, saveToggleState: saveToggleKey % 2 === 1, isExportingPDF: isExportingPDF },
|
|
136
|
+
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")), allowInlineEdit: props.inlineEditable && !canEditCase.isCaseNotEditable, content: summary ? summary : t('No summary to display.'), saveDisabled: saveDisabled, hideLabel: props.hideLabel, hideSaveCancel: props.hideSaveCancel, charCount: (summaryState === null || summaryState === void 0 ? void 0 : summaryState.length) || 0, charTotal: SUMMARY_LENGTH_LIMIT, cancelToggleState: cancelToggleKey % 2 === 1, saveToggleState: saveToggleKey % 2 === 1, isExportingPDF: isExportingPDF },
|
|
137
137
|
React.createElement("div", { className: "pf-v6-u-display-flex pf-v6-u-flex-direction-row pf-v6-u-align-items-center" },
|
|
138
138
|
React.createElement(TextInput, { type: "text", id: "case-details-summary", "aria-required": true, required: true, name: "case-details-summary", value: summaryState, onChange: (_event, value) => onSummaryChange(value), isDisabled: isSummaryUpdating, "data-tracking-id": "case-details-summary", onKeyDown: handleKeyDown, validated: (summaryState === null || summaryState === void 0 ? void 0 : summaryState.length) > SUMMARY_LENGTH_LIMIT || isSummaryEmpty
|
|
139
139
|
? ValidatedOptions.error
|
|
@@ -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;AAsBxE,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,
|
|
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;AAsBxE,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,4EAmSlB,CAAC;AAEH,eAAe,cAAc,CAAC"}
|
|
@@ -186,7 +186,7 @@ const CaseAttachment = React.forwardRef((props, ref) => {
|
|
|
186
186
|
React.createElement("code", { ref: clipboardRef }, props.attachment.checksum)),
|
|
187
187
|
React.createElement(Tooltip, { position: TooltipPosition.top, content: clipboardText, trigger: "click" },
|
|
188
188
|
React.createElement("button", { "aria-label": "Copy to clipboard", className: "nimbus-icon-clipboard clip-code-raw-btn xs-icon", onClick: copyToClipboard, type: "button" }))))),
|
|
189
|
-
React.createElement(InlineEdit, { labelProps: { htmlFor: `case-details-file-description-${props.attachment.id}` }, allowInlineEdit:
|
|
189
|
+
React.createElement(InlineEdit, { labelProps: { htmlFor: `case-details-file-description-${props.attachment.id}` }, allowInlineEdit: !canEditCase.isCaseNotEditable, labelContent: React.createElement(Trans, null, "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 ||
|
|
190
190
|
isCaseAttachmentDescription ||
|
|
191
191
|
attachmentDescription === props.attachment.description ||
|
|
192
192
|
isUpdating, loadingIndicator: isUpdating ? React.createElement(LoadingIndicator, { isInline: true }) : undefined, isExportingPDF: isExportingPDF },
|
|
@@ -198,7 +198,7 @@ const CaseAttachment = React.forwardRef((props, ref) => {
|
|
|
198
198
|
React.createElement("span", { className: "pull-right pf-v6-l-flex pf-m-align-items-center" },
|
|
199
199
|
props.showJumpToComment && (React.createElement(DiscussionItemLink, { onClick: onJumpToComment(props.attachment.id), discussionType: DiscussionType.ATTACHMENT, itemId: props.attachment.id, caseNumber: props.attachment.caseNumber, isCopyLink: false },
|
|
200
200
|
React.createElement(Trans, null, "Jump to attachment"))),
|
|
201
|
-
React.createElement("button", { className: `btn btn-app btn-link text-danger ${isExportingPDF ? 'hide-in-pdf' : ''}`, title: "Delete attachment", onClick: deleteAttachment(props.attachment), "data-tracking-id": "delete-attachmentid-button", type: "button" },
|
|
201
|
+
React.createElement("button", { className: `btn btn-app btn-link text-danger ${isExportingPDF ? 'hide-in-pdf' : ''}`, title: "Delete attachment", onClick: deleteAttachment(props.attachment), "data-tracking-id": "delete-attachmentid-button", type: "button", disabled: canEditCase.isCaseNotEditable },
|
|
202
202
|
React.createElement(Trans, null, "Delete")),
|
|
203
203
|
React.createElement(JumpAndCopyLink, { caseNumber: props.attachment.caseNumber, cardId: props.attachment.id, discussionType: DiscussionType.ATTACHMENT })))));
|
|
204
204
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostComment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment.tsx"],"names":[],"mappings":"AAUA,OAAO,KAA+D,MAAM,OAAO,CAAC;AAOpF,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAmB5E,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,WAAW,EAAE,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"PostComment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment.tsx"],"names":[],"mappings":"AAUA,OAAO,KAA+D,MAAM,OAAO,CAAC;AAOpF,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAmB5E,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,WAAW,EAAE,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,qBA+ZxC"}
|
|
@@ -244,7 +244,7 @@ export function PostComment(props) {
|
|
|
244
244
|
return plainText === commentSignature;
|
|
245
245
|
}
|
|
246
246
|
const isPostCommentDisabled = isProcessing || !commentText || isCommentSignatureMatch();
|
|
247
|
-
const isFileUploadDisabled = isConfirmedStateSideSupport && !cssCommentAgreed;
|
|
247
|
+
const isFileUploadDisabled = (isConfirmedStateSideSupport && !cssCommentAgreed) || canEditCase.isCaseNotEditable;
|
|
248
248
|
const onFileUploadClick = () => {
|
|
249
249
|
ToastNotification.addInfoMessage(t('Uploading Attachment(s)'));
|
|
250
250
|
};
|
|
@@ -257,7 +257,10 @@ export function PostComment(props) {
|
|
|
257
257
|
setIsCommentTooLong(lengthExceededNew);
|
|
258
258
|
};
|
|
259
259
|
// Submit stays independent of attachment upload so comments can be posted mid-upload (PCM-15915).
|
|
260
|
-
const isSubmitDisabled = isCommentEmpty ||
|
|
260
|
+
const isSubmitDisabled = isCommentEmpty ||
|
|
261
|
+
isPostCommentDisabled ||
|
|
262
|
+
(isConfirmedStateSideSupport && !cssCommentAgreed) ||
|
|
263
|
+
canEditCase.isCaseNotEditable;
|
|
261
264
|
return (React.createElement("div", { className: `pf-v6-u-mb-md ${isExportingPDF ? 'hide-in-pdf' : ''}`, ref: componentRef },
|
|
262
265
|
props.replyingToAuthor && (React.createElement("div", { className: "post-comment-reply-banner pf-v6-u-mb-sm", "data-tracking-id": "reply-banner" },
|
|
263
266
|
React.createElement("span", null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/CaseGroup.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAgB5E,UAAU,MAAM;IACZ,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAWD,iBAAS,SAAS,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"CaseGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/CaseGroup.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAgB5E,UAAU,MAAM;IACZ,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAWD,iBAAS,SAAS,CAAC,KAAK,EAAE,MAAM,qBAsZ/B;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -174,6 +174,18 @@ function CaseGroup(props) {
|
|
|
174
174
|
setInputValue(selectedGroup.name);
|
|
175
175
|
setSelected(selectedGroup.name);
|
|
176
176
|
}
|
|
177
|
+
else if (groupNumber && groupName) {
|
|
178
|
+
setSelectedCaseGroup({
|
|
179
|
+
name: groupName,
|
|
180
|
+
groupNum: groupNumber,
|
|
181
|
+
defaultMembers: [],
|
|
182
|
+
isDefault: false,
|
|
183
|
+
isPrivate: false,
|
|
184
|
+
members: [],
|
|
185
|
+
});
|
|
186
|
+
setInputValue(groupName);
|
|
187
|
+
setSelected(groupName);
|
|
188
|
+
}
|
|
177
189
|
else {
|
|
178
190
|
setCaseGroupInvalid(true);
|
|
179
191
|
}
|
|
@@ -207,13 +219,16 @@ function CaseGroup(props) {
|
|
|
207
219
|
setSelectedCaseGroupUsers(caseDispatch, accountNumber, '', loggedInUserRights.data);
|
|
208
220
|
}
|
|
209
221
|
setSelectedCaseGroup(emptyCaseGroup);
|
|
210
|
-
setCaseGroupInvalid(
|
|
222
|
+
setCaseGroupInvalid(!!isGroupMandatory);
|
|
211
223
|
setInputValue('');
|
|
212
224
|
setSelected('');
|
|
213
225
|
setIsOpen(false);
|
|
214
226
|
});
|
|
215
227
|
const showHelperText = !isSelectedUngroupedInvalid || (!isCaseGroupInvalid && !isGroupMandatory);
|
|
216
|
-
const showEmptyValidationError = !caseNumber &&
|
|
228
|
+
const showEmptyValidationError = !caseNumber &&
|
|
229
|
+
isGroupMandatory &&
|
|
230
|
+
isCaseGroupInvalid &&
|
|
231
|
+
(isNextBtnClickedToShowValidationError || isEmpty(groupNumber));
|
|
217
232
|
const canNotChangeGroup = () => !loggedInUserRights.data.isInternal() &&
|
|
218
233
|
!loggedInUser.data.isOrgAdmin &&
|
|
219
234
|
loggedInUser.data.ssoUsername !== contactSSOName &&
|
|
@@ -242,7 +257,8 @@ function CaseGroup(props) {
|
|
|
242
257
|
ownersCaseGroups.isFetching ||
|
|
243
258
|
isCaseGroupUpdating ||
|
|
244
259
|
isCaseOwnerUpdating ||
|
|
245
|
-
canNotChangeGroup()
|
|
260
|
+
canNotChangeGroup() ||
|
|
261
|
+
canEditCase.isCaseNotEditable, status: ownersCaseGroups.isError || showEmptyValidationError || (caseNumber && isSelectedUngroupedInvalid)
|
|
246
262
|
? 'danger'
|
|
247
263
|
: undefined, isFullWidth: true },
|
|
248
264
|
React.createElement(TextInputGroup, { isPlain: true },
|
|
@@ -264,8 +280,7 @@ function CaseGroup(props) {
|
|
|
264
280
|
React.createElement(SelectList, null, computeDropdownList().map((option, index) => (React.createElement(SelectOption, { key: option.name, isFocused: focusedItemIndex === index, value: option, isSelected: option.name === selected }, option.name))))),
|
|
265
281
|
caseNumber && isSelectedUngroupedInvalid && !isExportingPDF && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
266
282
|
React.createElement(Trans, null, "'Ungrouped Case' cannot be selected. Please select a group."))),
|
|
267
|
-
showEmptyValidationError && isGroupMandatory && !isExportingPDF && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
268
|
-
React.createElement(Trans, null, "Case group cannot be empty."))),
|
|
283
|
+
showEmptyValidationError && isGroupMandatory && !isExportingPDF && (React.createElement("p", { className: "form-instructions form-invalid" }, t('User are not allowed to create case if on account level caseGroupRequired is set to true'))),
|
|
269
284
|
showHelperText && (React.createElement("p", { className: "form-instructions" },
|
|
270
285
|
React.createElement(Trans, null, "Organization administrators have the permission to manage groups.")))));
|
|
271
286
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseLabels.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/CaseLabels.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAWzD,MAAM,CAAC,OAAO,UAAU,UAAU,
|
|
1
|
+
{"version":3,"file":"CaseLabels.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/CaseLabels.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAWzD,MAAM,CAAC,OAAO,UAAU,UAAU,sBAmLjC"}
|
|
@@ -72,7 +72,11 @@ export default function CaseLabels() {
|
|
|
72
72
|
});
|
|
73
73
|
const selectedLabels = availableLabels.filter((l) => selectedLabelIds.includes(l.id));
|
|
74
74
|
const haltEvent = (e) => e.stopPropagation();
|
|
75
|
-
const toggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, onClick: () => setIsOpen((prev) => !prev), isExpanded: isOpen, isDisabled: loading ||
|
|
75
|
+
const toggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, onClick: () => setIsOpen((prev) => !prev), isExpanded: isOpen, isDisabled: loading ||
|
|
76
|
+
mutating ||
|
|
77
|
+
!caseId ||
|
|
78
|
+
(!isOrgAdmin && availableLabels.length === 0) ||
|
|
79
|
+
canEditCase.isCaseNotEditable, isFullWidth: true, style: { height: '36px' } }, loading || mutating ? (React.createElement(Spinner, { size: "md" })) : selectedLabels.length > 0 ? (React.createElement("span", { style: { display: 'flex', gap: '8px', alignItems: 'center', flexWrap: 'nowrap' } },
|
|
76
80
|
selectedLabels.slice(0, NUM_VISIBLE_LABELS).map((label) => (React.createElement(Label, { key: label.id, variant: "outline", onClose: () => handleChipRemove(label.id), closeBtnAriaLabel: t('Remove label {{name}}', { name: label.name }), onClick: haltEvent }, label.name))),
|
|
77
81
|
selectedLabels.length > NUM_VISIBLE_LABELS && (React.createElement("span", { style: {
|
|
78
82
|
color: 'var(--pf-t--global--text--color--link--default)',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fts.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Fts.tsx"],"names":[],"mappings":"AAWA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAS/D,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAQD,iBAAS,GAAG,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Fts.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Fts.tsx"],"names":[],"mappings":"AAWA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAS/D,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAQD,iBAAS,GAAG,CAAC,KAAK,EAAE,MAAM,qBAgPzB;kBAhPQ,GAAG;;;AAmPZ,eAAe,GAAG,CAAC"}
|
|
@@ -150,7 +150,8 @@ function Fts(props) {
|
|
|
150
150
|
}
|
|
151
151
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
152
152
|
}, [phoneAreaCodePrefixLineNumber, phoneCountryCode]);
|
|
153
|
-
const disableFtsNContact = !isEmpty(caseNumber) &&
|
|
153
|
+
const disableFtsNContact = !isEmpty(caseNumber) &&
|
|
154
|
+
(!isFtsEditableOnEditPage(entitlementSla, severity) || isFtsUpdating || canEditCase.isCaseNotEditable);
|
|
154
155
|
const maxLengthErrorMessage = t('Contact information cannot be more than {{limit}} characters.', {
|
|
155
156
|
limit: CONTACT_INFO_24X7_LIMIT,
|
|
156
157
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Review.d.ts","sourceRoot":"","sources":["../../../../src/components/Review/Review.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"Review.d.ts","sourceRoot":"","sources":["../../../../src/components/Review/Review.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAsBlE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AACD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,MAAM,qBAgG3C"}
|
|
@@ -16,6 +16,7 @@ import { ContactPhoneNumber } from '../CaseInformation/ContactPhoneNumber';
|
|
|
16
16
|
import Fts from '../CaseInformation/Fts';
|
|
17
17
|
import Severity from '../CaseInformation/Severity';
|
|
18
18
|
import SupportLevel from '../CaseInformation/SupportLevel';
|
|
19
|
+
import CaseLabelsCreate from '../CaseManagement/CaseLabelsCreate';
|
|
19
20
|
import CaseLanguageSelector from '../CaseManagement/CaseLanguageSelector';
|
|
20
21
|
// import { Cep } from '../CaseManagement/Cep';
|
|
21
22
|
import OpenReferenceNumber from '../CaseManagement/OpenReferenceNumber';
|
|
@@ -71,5 +72,8 @@ export default function Review(props) {
|
|
|
71
72
|
React.createElement(CaseLanguageSelector, null)),
|
|
72
73
|
React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xs" },
|
|
73
74
|
React.createElement(CaseGroup, null))),
|
|
75
|
+
React.createElement(Grid, { hasGutter: true },
|
|
76
|
+
React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xs" },
|
|
77
|
+
React.createElement(CaseLabelsCreate, null))),
|
|
74
78
|
React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true }))));
|
|
75
79
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAB.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAB.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useAB.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAB.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,aAAa;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,YAAY;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,sBAAuB,SAAQ,aAAa;IACzD,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IACtB,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACvD,SAAS,EAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;CACjC;AAED,oBAAY,MAAM;IACd,CAAC,MAAM;IACP,CAAC,MAAM;CACV;AAED,wBAAgB,2BAA2B,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAarF;AAkBD,wBAAgB,KAAK,CAAC,OAAO,GAAE,aAAkB,GAAG,YAAY,CAe/D;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,sBAAsB,GAAG,qBAAqB,CAMrF"}
|
package/lib/esm/hooks/useAB.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { useContext, useEffect, useState } from 'react';
|
|
5
|
-
import { useCaseDispatch, useCaseSelector } from '../context/CaseContext';
|
|
1
|
+
import { Env } from '@cee-eng/hydrajs';
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { useCaseDispatch } from '../context/CaseContext';
|
|
6
4
|
import { setABTestVariation } from '../reducers/CaseReducer';
|
|
7
5
|
export var ABEnum;
|
|
8
6
|
(function (ABEnum) {
|
|
@@ -15,54 +13,34 @@ export function getVariationByAccountNumber(accountNumber) {
|
|
|
15
13
|
}
|
|
16
14
|
const lastChar = accountNumber.charAt(accountNumber.length - 1);
|
|
17
15
|
const lastDigit = parseInt(lastChar, 10);
|
|
18
|
-
// If lastDigit is not a valid number, default to B
|
|
19
16
|
if (isNaN(lastDigit)) {
|
|
20
17
|
return ABEnum.B;
|
|
21
18
|
}
|
|
22
|
-
// Even last digit → Experience A, Odd last digit → Experience B
|
|
23
19
|
return lastDigit % 2 === 0 ? ABEnum.A : ABEnum.B;
|
|
24
20
|
}
|
|
21
|
+
function getVariationFromUrl() {
|
|
22
|
+
const isNonProdEnv = Env.getEnvName() !== Env.EnvNames.PROD && Env.getEnvName() !== Env.EnvNames.PROD_BETA;
|
|
23
|
+
if (!isNonProdEnv)
|
|
24
|
+
return null;
|
|
25
|
+
const hashQueryString = window.location.hash.includes('?')
|
|
26
|
+
? window.location.hash.substring(window.location.hash.indexOf('?'))
|
|
27
|
+
: '';
|
|
28
|
+
const urlParams = new URLSearchParams(hashQueryString || window.location.search);
|
|
29
|
+
const useflow = urlParams.get('useflow');
|
|
30
|
+
if (useflow && (useflow.charAt(0).toLowerCase() === 'a' || useflow.charAt(0).toLowerCase() === 'b')) {
|
|
31
|
+
return useflow.charAt(0).toUpperCase() === 'A' ? ABEnum.A : ABEnum.B;
|
|
32
|
+
}
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
25
35
|
export function useAB(options = {}) {
|
|
26
|
-
const
|
|
27
|
-
const [testVariation, setTestVariation] = useState((options === null || options === void 0 ? void 0 : options.defaultVariation) || ABEnum.A);
|
|
36
|
+
const [testVariation, setTestVariation] = useState((options === null || options === void 0 ? void 0 : options.defaultVariation) || ABEnum.B);
|
|
28
37
|
const caseDispatch = useCaseDispatch();
|
|
29
|
-
const { caseType } = useCaseSelector((state) => ({ caseType: state.caseDetails.caseType }), isEqual);
|
|
30
38
|
useEffect(() => {
|
|
31
|
-
var _a
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
: '';
|
|
37
|
-
const urlParams = new URLSearchParams(hashQueryString || window.location.search);
|
|
38
|
-
const useflowFromUrl = urlParams.get('useflow');
|
|
39
|
-
if (useflowFromUrl &&
|
|
40
|
-
(((_a = useflowFromUrl === null || useflowFromUrl === void 0 ? void 0 : useflowFromUrl.charAt(0)) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'a' || ((_b = useflowFromUrl === null || useflowFromUrl === void 0 ? void 0 : useflowFromUrl.charAt(0)) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'b')) {
|
|
41
|
-
newVariation = (useflowFromUrl === null || useflowFromUrl === void 0 ? void 0 : useflowFromUrl.charAt(0).toUpperCase()) === 'A' ? ABEnum.A : ABEnum.B;
|
|
42
|
-
}
|
|
43
|
-
else if (loggedInUsersAccount.data.hasConfirmedStatesideSupport || loggedInUsersAccount.data.secureSupport) {
|
|
44
|
-
newVariation = ABEnum.B;
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
const isABTestingEnabled = getConfigField(pcmConfig.data, 'askRedHatAccountsA', PCM_CONFIG_FIELD_TYPE.FEATURE_FLAG);
|
|
48
|
-
const userAccountNumber = loggedInUsersAccount.data.accountNumber;
|
|
49
|
-
if (isABTestingEnabled && userAccountNumber) {
|
|
50
|
-
newVariation = getVariationByAccountNumber(userAccountNumber);
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
newVariation = ABEnum.B;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
// Update local state used to display only the UI conditionally
|
|
57
|
-
setTestVariation(newVariation);
|
|
58
|
-
// Update global Redux state for analytics (userAgent field) - used in session
|
|
59
|
-
setABTestVariation(caseDispatch, newVariation);
|
|
60
|
-
// Check if the case type is Idea and update the variation to B (only for UI display) global state is still A
|
|
61
|
-
if (caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT) {
|
|
62
|
-
setTestVariation(ABEnum.B);
|
|
63
|
-
}
|
|
64
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
65
|
-
}, [pcmConfig.data, loggedInUsersAccount.data.accountNumber, caseDispatch, caseType]);
|
|
39
|
+
var _a;
|
|
40
|
+
const variation = (_a = getVariationFromUrl()) !== null && _a !== void 0 ? _a : ABEnum.B;
|
|
41
|
+
setTestVariation(variation);
|
|
42
|
+
setABTestVariation(caseDispatch, variation);
|
|
43
|
+
}, [caseDispatch]);
|
|
66
44
|
return {
|
|
67
45
|
variation: testVariation,
|
|
68
46
|
isVariationA: testVariation === ABEnum.A,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseReducer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAEtH,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAA+B,MAAM,qCAAqC,CAAC;AAC9G,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAE/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAcH,uBAAuB,EAGvB,gBAAgB,EAInB,MAAM,mBAAmB,CAAC;AAY3B,OAAO,EAEH,uBAAuB,EAEvB,iBAAiB,EACjB,UAAU,EAGb,MAAM,mBAAmB,CAAC;AAU3B,OAAO,EAAE,0BAA0B,EAAiB,MAAM,yBAAyB,CAAC;AAIpF,eAAO,MAAM,WAAW,GAAI,QAAQ,UAAU,EAAE,QAAQ,GAAG,KAAG,
|
|
1
|
+
{"version":3,"file":"CaseReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseReducer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAEtH,OAAO,EAAE,QAAQ,EAAE,MAAM,wC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BAAkB,GAAI,UAAU,uBAAuB,EAAE,MAAM,OAAO,SAKlF,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,UAAU,uBAAuB,EAAE,iBAAiB,MAAM,SAK5F,CAAC"}
|
|
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
};
|
|
21
21
|
import { contacts, kase, pcm, publicApi } from '@cee-eng/hydrajs';
|
|
22
22
|
import { formattedApiErrorMessage } from '@rh-support/components';
|
|
23
|
-
import { CREATE_CASE_LABEL_LINK, CREATE_SUPPORT_CASE, dtmTrackEventCaseCreationStepEncountered, fetchCaseDetailsByCaseNumber, fetchLoggedInUserAccountContactsFromGraphQL, GET_ACCOUNT,
|
|
23
|
+
import { CREATE_CASE_LABEL_LINK, CREATE_SUPPORT_CASE, dtmTrackEventCaseCreationStepEncountered, fetchAllAccountCaseGroups, fetchCaseDetailsByCaseNumber, fetchContactMemberGroups, fetchLoggedInUserAccountContactsFromGraphQL, GET_ACCOUNT, GET_PRODUCTS, getAccountQueryVariables, getApiResourceObject, handleGraphQLAccountResponse, handleGraphQLVersionsResponse, mapGraphQLCaseDetailsToCasePayload, mapSfdcStatusToPortalStatus, PreviousToNewCaseTypeMap, updateCaseDetailsGraphQLRequest, } from '@rh-support/utils';
|
|
24
24
|
// import delay from 'lodash/delay';
|
|
25
25
|
import filter from 'lodash/filter';
|
|
26
26
|
import find from 'lodash/find';
|
|
@@ -51,10 +51,6 @@ export const caseReducer = (pState, action) => {
|
|
|
51
51
|
}
|
|
52
52
|
if (Object.prototype.hasOwnProperty.call((_f = (_e = action.payload) === null || _e === void 0 ? void 0 : _e.caseDetails) !== null && _f !== void 0 ? _f : {}, 'product') &&
|
|
53
53
|
pState.caseDetails.product !== ((_h = (_g = action.payload) === null || _g === void 0 ? void 0 : _g.caseDetails) === null || _h === void 0 ? void 0 : _h.product)) {
|
|
54
|
-
// Reset SLA on product change unless the caller already provided the new entitlement SLA
|
|
55
|
-
if (!Object.prototype.hasOwnProperty.call(action.payload.caseDetails, 'entitlementSla')) {
|
|
56
|
-
action.payload.caseDetails.entitlementSla = undefined;
|
|
57
|
-
}
|
|
58
54
|
resetEntitlementId = true;
|
|
59
55
|
}
|
|
60
56
|
return Object.assign(Object.assign(Object.assign({}, pState), { hasLargeCaseDescription, caseDetails: Object.assign(Object.assign({}, pState.caseDetails), action.payload.caseDetails), isCaseUpdating: false }), (resetEntitlementId ? { selectedEntitlementId: undefined } : {}));
|
|
@@ -635,26 +631,26 @@ export const fetchCaseGroupsForSSO = (dispatch_1, contactSsoUsername_1, ...args_
|
|
|
635
631
|
}
|
|
636
632
|
});
|
|
637
633
|
export const fetchCaseGroupsForContactGraphQL = (dispatch_1, apolloClient_1, contactId_1, accountNumber_1, defaultCaseGroupId_1, ...args_1) => __awaiter(void 0, [dispatch_1, apolloClient_1, contactId_1, accountNumber_1, defaultCaseGroupId_1, ...args_1], void 0, function* (dispatch, apolloClient, contactId, accountNumber, defaultCaseGroupId, isOrgAdmin = false, currentGroupNumber) {
|
|
638
|
-
var _a, _b, _c, _d;
|
|
639
634
|
dispatch({
|
|
640
635
|
type: CaseReducerConstants.caseStateChanged,
|
|
641
636
|
payload: { ownersCaseGroups: getApiResourceObject([], true) },
|
|
642
637
|
});
|
|
643
638
|
try {
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
.
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
639
|
+
let matchedGroups;
|
|
640
|
+
if (isOrgAdmin) {
|
|
641
|
+
matchedGroups = yield fetchAllAccountCaseGroups(apolloClient, accountNumber);
|
|
642
|
+
}
|
|
643
|
+
else {
|
|
644
|
+
matchedGroups = yield fetchContactMemberGroups(apolloClient, contactId);
|
|
645
|
+
}
|
|
646
|
+
if (defaultCaseGroupId && !matchedGroups.some((g) => g.groupId === defaultCaseGroupId)) {
|
|
647
|
+
const allGroups = isOrgAdmin ? [] : yield fetchAllAccountCaseGroups(apolloClient, accountNumber);
|
|
648
|
+
const currentGroupEdge = allGroups.find((g) => g.groupId === defaultCaseGroupId);
|
|
649
|
+
if (currentGroupEdge) {
|
|
650
|
+
matchedGroups.push(currentGroupEdge);
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
matchedGroups.sort((a, b) => a.groupName.localeCompare(b.groupName));
|
|
658
654
|
const ownersCaseGroups = matchedGroups.map((g) => ({
|
|
659
655
|
groupNum: g.groupId,
|
|
660
656
|
name: g.groupName,
|
|
@@ -894,8 +890,8 @@ export const updateCaseDetailsGraphQL = (dispatch, apolloClient, caseNumber, cas
|
|
|
894
890
|
dispatch({ type: CaseReducerConstants.updateCaseDetailCompleted });
|
|
895
891
|
return;
|
|
896
892
|
}
|
|
897
|
-
// productId/entitlementId are
|
|
898
|
-
const { productId: _productId, entitlementId: _entitlementId } = caseUpdate, caseUpdateWithoutIds = __rest(caseUpdate, ["productId", "entitlementId"]);
|
|
893
|
+
// productId/entitlementId/entitlementSla are not sent in GraphQL case updates from case edit
|
|
894
|
+
const { productId: _productId, entitlementId: _entitlementId, entitlementSla: _entitlementSla } = caseUpdate, caseUpdateWithoutIds = __rest(caseUpdate, ["productId", "entitlementId", "entitlementSla"]);
|
|
899
895
|
let updatedCaseDetails = Object.assign({}, caseUpdateWithoutIds);
|
|
900
896
|
if (graphqlDetails) {
|
|
901
897
|
const mappedGraphQLDetails = mapGraphQLCaseDetailsToCasePayload(graphqlDetails);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.337",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
"@progress/kendo-licensing": "1.3.5",
|
|
53
53
|
"@progress/kendo-react-pdf": "^5.16.0",
|
|
54
54
|
"@redux-devtools/extension": "^3.3.0",
|
|
55
|
-
"@rh-support/components": "2.5.
|
|
56
|
-
"@rh-support/react-context": "2.5.
|
|
55
|
+
"@rh-support/components": "2.5.210",
|
|
56
|
+
"@rh-support/react-context": "2.5.305",
|
|
57
57
|
"@rh-support/types": "2.0.26",
|
|
58
|
-
"@rh-support/user-permissions": "2.5.
|
|
59
|
-
"@rh-support/utils": "2.5.
|
|
58
|
+
"@rh-support/user-permissions": "2.5.157",
|
|
59
|
+
"@rh-support/utils": "2.5.138",
|
|
60
60
|
"@types/react-redux": "^7.1.33",
|
|
61
61
|
"@types/redux": "^3.6.0",
|
|
62
62
|
"date-fns": "3.6.0",
|
|
@@ -128,5 +128,5 @@
|
|
|
128
128
|
"defaults and supports es6-module",
|
|
129
129
|
"maintained node versions"
|
|
130
130
|
],
|
|
131
|
-
"gitHead": "
|
|
131
|
+
"gitHead": "d8c5155f1ffe40e41ea5bb448df3b0418cc0ea0c"
|
|
132
132
|
}
|