@rh-support/troubleshoot 2.6.333 → 2.6.335
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 +1 -0
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +1 -1
- 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 +13 -8
- 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/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +26 -4
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +26 -4
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +1 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +1 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +7 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +106 -71
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +4 -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 +42 -13
- 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/ContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +70 -6
- 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/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +12 -2
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.js +13 -0
- 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/types.d.ts +11 -5
- package/lib/esm/hooks/useCaseComments/types.d.ts.map +1 -1
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +2 -1
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +1 -1
- package/lib/esm/hooks/useCaseComments/useCaseComments.js +15 -2
- 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 +3 -0
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +1 -0
- 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/CaseHelpers.js +1 -1
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +9 -6
- 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,qBAsXnC;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -198,6 +198,7 @@ function OwnerSelector(props) {
|
|
|
198
198
|
phoneAreaCodePrefixLineNumber: '',
|
|
199
199
|
phoneCountryCode: '',
|
|
200
200
|
});
|
|
201
|
+
setCaseState(caseDispatch, { hasUserUpdatedSuppliedPhone: false });
|
|
201
202
|
onOwnerChange(customerContacts[0], previousCaseOwner, selectedNotificationContacts, caseDispatch);
|
|
202
203
|
}
|
|
203
204
|
});
|
|
@@ -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',
|
|
@@ -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,qBA4hBjD"}
|
|
@@ -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* () {
|
|
@@ -238,6 +240,7 @@ export default function CaseOverview(props) {
|
|
|
238
240
|
};
|
|
239
241
|
const portalStatus = mapSfdcStatusToPortalStatus(status);
|
|
240
242
|
const isCaseInOpenState = portalStatus !== 'Closed' && portalStatus !== 'Archived';
|
|
243
|
+
const isCaseArchived = portalStatus === 'Archived';
|
|
241
244
|
// To switch from old case type to new support type
|
|
242
245
|
const newCaseTypesArray = toNewCaseTypeMapper(allCaseTypes.data).sort();
|
|
243
246
|
return (React.createElement(React.Fragment, null,
|
|
@@ -262,13 +265,13 @@ 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
|
+
!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'))))),
|
|
272
275
|
React.createElement("div", { className: `case-details-header-secondary push-bottom-narrow pf-v6-u-mb-sm ${isExportingPDF && !viewAsCustomer ? 'hide-in-pdf' : ''}` },
|
|
273
276
|
React.createElement("span", { className: `case-support-level ${isExportingPDF ? 'hide-in-pdf' : ''}` }, computeSupportLink())),
|
|
274
277
|
React.createElement("div", { className: "case-details-summary push-bottom-narrow" },
|
|
@@ -308,7 +311,7 @@ export default function CaseOverview(props) {
|
|
|
308
311
|
React.createElement("div", { className: "case-overview-secondary card card-md card-light push-bottom" },
|
|
309
312
|
React.createElement("div", { className: "pf-v6-l-grid pf-m-gutter pf-m-all-4-col-on-lg" },
|
|
310
313
|
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 })),
|
|
314
|
+
React.createElement(CaseStatus, { selectedStatus: status, onStatusChange: onStatusChange, isDisabled: !canManageCase || allCaseStatuses.isFetching || isCaseArchived, isFetching: caseOverviewState.caseStatusUpdating && isCaseUpdating, hasError: allCaseStatuses.isError })),
|
|
312
315
|
React.createElement("div", { className: "form-wrapper" },
|
|
313
316
|
React.createElement(CaseType, { selectedType: switchedCaseType, onTypeChange: onTypeChange, isDisabled: !canManageCase || allCaseTypes.isFetching || isCaseUpdating, allTypes: newCaseTypesArray, isFetching: caseOverviewState.caseTypeUpdating && isCaseUpdating, hasError: allCaseTypes.isError })),
|
|
314
317
|
React.createElement("div", { className: "form-wrapper" },
|
|
@@ -316,10 +319,12 @@ export default function CaseOverview(props) {
|
|
|
316
319
|
React.createElement(ExpandableSection, { className: "case-details-main", toggleText: t('Case information'), isExpanded: isDetailsExpanded, onToggle: onToggleDetails },
|
|
317
320
|
React.createElement(CaseInformation, null))),
|
|
318
321
|
showCloseCaseModal && (React.createElement(CloseCaseModal, { onConfirm: (commentBody) => __awaiter(this, void 0, void 0, function* () {
|
|
319
|
-
yield updateStatusState(CaseStatusEnum.CLOSED);
|
|
320
|
-
|
|
322
|
+
const success = yield updateStatusState(CaseStatusEnum.CLOSED);
|
|
323
|
+
if (success) {
|
|
324
|
+
yield postCommentAfterStatusUpdate(commentBody);
|
|
325
|
+
dtmTrackEventCaseStepEncountered('close', caseNumber, product, version);
|
|
326
|
+
}
|
|
321
327
|
setShowCaseCloseModal(false);
|
|
322
|
-
dtmTrackEventCaseStepEncountered('close', caseNumber, product, version);
|
|
323
328
|
}), isUpdating: (caseOverviewState.caseStatusUpdating && isCaseUpdating) || isPostingComment, onClose: () => {
|
|
324
329
|
setShowCaseCloseModal(false);
|
|
325
330
|
}, 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);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewEssTermsModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NewEssTermsModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAYnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBAib7C"}
|
|
@@ -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 { publicApi } from '@cee-eng/hydrajs';
|
|
12
|
-
import { Alert, Button, ButtonVariant, Checkbox, Modal, ModalBody, ModalFooter, ModalHeader, TextArea, TextInput, } from '@patternfly/react-core';
|
|
12
|
+
import { Alert, Button, ButtonVariant, Checkbox, Modal, ModalBody, ModalFooter, ModalHeader, Progress, ProgressMeasureLocation, ProgressSize, ProgressVariant, TextArea, TextInput, } from '@patternfly/react-core';
|
|
13
13
|
import DownloadIcon from '@patternfly/react-icons/dist/js/icons/download-icon';
|
|
14
14
|
import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
|
|
15
15
|
import { SingleSelectDropdown, useFetch } from '@rh-support/components';
|
|
@@ -19,7 +19,7 @@ import { Trans, useTranslation } from 'react-i18next';
|
|
|
19
19
|
import { useCaseDispatch, useCaseSelector } from '../../../context/CaseContext';
|
|
20
20
|
import { GET_CASE_COMMENTS, useCreateCaseComment } from '../../../hooks/useCaseComments';
|
|
21
21
|
import { checkForCaseStatusToggleOnAttachOrComment, updateCaseDetailsGraphQL } from '../../../reducers/CaseReducer';
|
|
22
|
-
import { formatSessionLinks, getLocaleNameFromLocalCode } from './remoteSessionUtils';
|
|
22
|
+
import { formatSessionLinks, getLocaleNameFromLocalCode, REMOTE_SESSION_FIELD_LENGTH_LIMIT, } from './remoteSessionUtils';
|
|
23
23
|
export function NewEssTermsModal(props) {
|
|
24
24
|
const { t } = useTranslation();
|
|
25
25
|
const { remoteSessionTermsAcked } = useCaseSelector((state) => ({
|
|
@@ -78,6 +78,26 @@ export function NewEssTermsModal(props) {
|
|
|
78
78
|
const updateSessionExpectation = (event, value) => setSessionExpectations(value);
|
|
79
79
|
const updateImpact = (event, value) => setImpact(value);
|
|
80
80
|
const updateSessionLink = (event, value) => setSessionLink(value);
|
|
81
|
+
const getVariantSessionExpectations = () => {
|
|
82
|
+
if (!sessionExpectations)
|
|
83
|
+
return ProgressVariant.success;
|
|
84
|
+
if (sessionExpectations.length > REMOTE_SESSION_FIELD_LENGTH_LIMIT / 2) {
|
|
85
|
+
return ProgressVariant.warning;
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
return ProgressVariant.success;
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
const getVariantImpact = () => {
|
|
92
|
+
if (!impact)
|
|
93
|
+
return ProgressVariant.success;
|
|
94
|
+
if (impact.length > REMOTE_SESSION_FIELD_LENGTH_LIMIT / 2) {
|
|
95
|
+
return ProgressVariant.warning;
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
return ProgressVariant.success;
|
|
99
|
+
}
|
|
100
|
+
};
|
|
81
101
|
// To handle modal cancel and close
|
|
82
102
|
const onCancel = () => {
|
|
83
103
|
if (agreeLoading || isPostingComment)
|
|
@@ -191,12 +211,14 @@ export function NewEssTermsModal(props) {
|
|
|
191
211
|
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
192
212
|
React.createElement(Trans, null, "Preferred Time and Expectations for Remote Session"),
|
|
193
213
|
React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
|
|
194
|
-
React.createElement(TextArea, { value: sessionExpectations, onChange: updateSessionExpectation, rows: 3, placeholder: "Please share anything that will help prepare for our meeting?", isRequired: true, "aria-label": "Preferred Time and Expectations for Remote Session" })
|
|
214
|
+
React.createElement(TextArea, { value: sessionExpectations, onChange: updateSessionExpectation, rows: 3, placeholder: "Please share anything that will help prepare for our meeting?", isRequired: true, maxLength: REMOTE_SESSION_FIELD_LENGTH_LIMIT, "aria-label": "Preferred Time and Expectations for Remote Session" }),
|
|
215
|
+
React.createElement(Progress, { value: sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length, min: 0, max: REMOTE_SESSION_FIELD_LENGTH_LIMIT, size: ProgressSize.sm, label: `${sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, valueText: `${sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, measureLocation: ProgressMeasureLocation.top, "aria-label": `Progress - ${sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, variant: getVariantSessionExpectations(), title: ' ', className: `pf-v6-u-mt-md kt-progress-bar`, id: "summary-progress-bar" })),
|
|
195
216
|
React.createElement("div", null,
|
|
196
217
|
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
197
218
|
React.createElement(Trans, null, "Describe the impact to you or the business"),
|
|
198
219
|
React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
|
|
199
|
-
React.createElement(TextArea, { value: impact, onChange: updateImpact, rows: 3, placeholder: "Describe the user or financial impact.", isRequired: true, "aria-label": "Describe the impact to you or the business" })
|
|
220
|
+
React.createElement(TextArea, { value: impact, onChange: updateImpact, rows: 3, placeholder: "Describe the user or financial impact.", isRequired: true, maxLength: REMOTE_SESSION_FIELD_LENGTH_LIMIT, "aria-label": "Describe the impact to you or the business" }),
|
|
221
|
+
React.createElement(Progress, { value: impact === null || impact === void 0 ? void 0 : impact.length, min: 0, max: REMOTE_SESSION_FIELD_LENGTH_LIMIT, size: ProgressSize.sm, label: `${impact === null || impact === void 0 ? void 0 : impact.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, valueText: `${impact === null || impact === void 0 ? void 0 : impact.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, measureLocation: ProgressMeasureLocation.top, "aria-label": `Progress - ${impact === null || impact === void 0 ? void 0 : impact.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, variant: getVariantImpact(), title: ' ', className: `pf-v6-u-mt-md kt-progress-bar`, id: "summary-progress-bar" })),
|
|
200
222
|
React.createElement("div", null,
|
|
201
223
|
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
202
224
|
React.createElement(Trans, null, "Remote session link (optional)")),
|
package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteSessionAgreementModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RemoteSessionAgreementModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAgBnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBA0axD"}
|
|
@@ -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 { publicApi } from '@cee-eng/hydrajs';
|
|
12
|
-
import { Alert, Button, ButtonVariant, Checkbox, Modal, ModalBody, ModalFooter, ModalHeader, TextArea, TextInput, } from '@patternfly/react-core';
|
|
12
|
+
import { Alert, Button, ButtonVariant, Checkbox, Modal, ModalBody, ModalFooter, ModalHeader, Progress, ProgressMeasureLocation, ProgressSize, ProgressVariant, TextArea, TextInput, } from '@patternfly/react-core';
|
|
13
13
|
import DownloadIcon from '@patternfly/react-icons/dist/js/icons/download-icon';
|
|
14
14
|
import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
|
|
15
15
|
import { SingleSelectDropdown, useFetch } from '@rh-support/components';
|
|
@@ -19,7 +19,7 @@ import { Trans, useTranslation } from 'react-i18next';
|
|
|
19
19
|
import { useCaseDispatch, useCaseSelector } from '../../../context/CaseContext';
|
|
20
20
|
import { GET_CASE_COMMENTS, useCreateCaseComment } from '../../../hooks/useCaseComments';
|
|
21
21
|
import { checkForCaseStatusToggleOnAttachOrComment, setRemoteRiderFlag, updateCaseDetailsGraphQL, } from '../../../reducers/CaseReducer';
|
|
22
|
-
import { formatSessionLinks, getLocaleNameFromLocalCode } from './remoteSessionUtils';
|
|
22
|
+
import { formatSessionLinks, getLocaleNameFromLocalCode, REMOTE_SESSION_FIELD_LENGTH_LIMIT, } from './remoteSessionUtils';
|
|
23
23
|
export function RemoteSessionAgreementModal(props) {
|
|
24
24
|
const { t } = useTranslation();
|
|
25
25
|
const { remoteSessionTermsAcked } = useCaseSelector((state) => ({
|
|
@@ -78,6 +78,26 @@ export function RemoteSessionAgreementModal(props) {
|
|
|
78
78
|
const updateSessionExpectation = (event, value) => setSessionExpectations(value);
|
|
79
79
|
const updateImpact = (event, value) => setImpact(value);
|
|
80
80
|
const updateSessionLink = (event, value) => setSessionLink(value);
|
|
81
|
+
const getVariantSessionExpectations = () => {
|
|
82
|
+
if (!sessionExpectations)
|
|
83
|
+
return ProgressVariant.success;
|
|
84
|
+
if (sessionExpectations.length > REMOTE_SESSION_FIELD_LENGTH_LIMIT / 2) {
|
|
85
|
+
return ProgressVariant.warning;
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
return ProgressVariant.success;
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
const getVariantImpact = () => {
|
|
92
|
+
if (!impact)
|
|
93
|
+
return ProgressVariant.success;
|
|
94
|
+
if (impact.length > REMOTE_SESSION_FIELD_LENGTH_LIMIT / 2) {
|
|
95
|
+
return ProgressVariant.warning;
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
return ProgressVariant.success;
|
|
99
|
+
}
|
|
100
|
+
};
|
|
81
101
|
// To handle modal cancel and close
|
|
82
102
|
const onCancel = () => {
|
|
83
103
|
if (agreeLoading || isPostingComment)
|
|
@@ -175,12 +195,14 @@ export function RemoteSessionAgreementModal(props) {
|
|
|
175
195
|
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
176
196
|
React.createElement(Trans, null, "Preferred Time and Expectations for Remote Session"),
|
|
177
197
|
React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
|
|
178
|
-
React.createElement(TextArea, { value: sessionExpectations, onChange: updateSessionExpectation, rows: 3, placeholder: "Please share anything that will help prepare for our meeting?", isRequired: true, "aria-label": "Preferred Time and Expectations for Remote Session" })
|
|
198
|
+
React.createElement(TextArea, { value: sessionExpectations, onChange: updateSessionExpectation, rows: 3, placeholder: "Please share anything that will help prepare for our meeting?", isRequired: true, maxLength: REMOTE_SESSION_FIELD_LENGTH_LIMIT, "aria-label": "Preferred Time and Expectations for Remote Session" }),
|
|
199
|
+
React.createElement(Progress, { value: sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length, min: 0, max: REMOTE_SESSION_FIELD_LENGTH_LIMIT, size: ProgressSize.sm, label: `${sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, valueText: `${sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, measureLocation: ProgressMeasureLocation.top, "aria-label": `Progress - ${sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, variant: getVariantSessionExpectations(), title: ' ', className: `pf-v6-u-mt-md kt-progress-bar`, id: "summary-progress-bar" })),
|
|
179
200
|
React.createElement("div", null,
|
|
180
201
|
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
181
202
|
React.createElement(Trans, null, "Describe the impact to you or the business"),
|
|
182
203
|
React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
|
|
183
|
-
React.createElement(TextArea, { value: impact, onChange: updateImpact, rows: 3, placeholder: "Describe the user or financial impact.", isRequired: true, "aria-label": "Describe the impact to you or the business" })
|
|
204
|
+
React.createElement(TextArea, { value: impact, onChange: updateImpact, rows: 3, placeholder: "Describe the user or financial impact.", isRequired: true, maxLength: REMOTE_SESSION_FIELD_LENGTH_LIMIT, "aria-label": "Describe the impact to you or the business" }),
|
|
205
|
+
React.createElement(Progress, { value: impact === null || impact === void 0 ? void 0 : impact.length, min: 0, max: REMOTE_SESSION_FIELD_LENGTH_LIMIT, size: ProgressSize.sm, label: `${impact === null || impact === void 0 ? void 0 : impact.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, valueText: `${impact === null || impact === void 0 ? void 0 : impact.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, measureLocation: ProgressMeasureLocation.top, "aria-label": `Progress - ${impact === null || impact === void 0 ? void 0 : impact.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, variant: getVariantImpact(), title: ' ', className: `pf-v6-u-mt-md kt-progress-bar`, id: "summary-progress-bar" })),
|
|
184
206
|
React.createElement("div", null,
|
|
185
207
|
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
186
208
|
React.createElement(Trans, null, "Remote session link (optional)")),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remoteSessionUtils.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,GAAI,YAAY,MAAM,KAAG,MAa/D,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,aAAa,MAAM,KAAG,MAOxD,CAAC"}
|
|
1
|
+
{"version":3,"file":"remoteSessionUtils.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iCAAiC,OAAO,CAAC;AAEtD,eAAO,MAAM,0BAA0B,GAAI,YAAY,MAAM,KAAG,MAa/D,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,aAAa,MAAM,KAAG,MAOxD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.tsx"],"names":[],"mappings":"AAWA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAuC/D,wBAAgB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"CaseContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.tsx"],"names":[],"mappings":"AAWA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAuC/D,wBAAgB,sBAAsB,sBAgYrC"}
|
|
@@ -24,7 +24,7 @@ import { PHONE_INSTRUCTION, PHONE_IS_NOT_VALID, PHONE_LINE_CANNOT_BE_EMPTY, PHON
|
|
|
24
24
|
import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
|
|
25
25
|
import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
|
|
26
26
|
import { PHONE_LIMIT } from '../../../../reducers/CaseConstNTypes';
|
|
27
|
-
import { setCaseState, updateCaseDetails } from '../../../../reducers/CaseReducer';
|
|
27
|
+
import { setCaseState, updateCaseDetails, updateCaseDetailsGraphQL } from '../../../../reducers/CaseReducer';
|
|
28
28
|
import { ContactPhoneNumberPopOver } from '../../../CaseInformation/ContactPhoneNumberPopOver';
|
|
29
29
|
import { removeAllChars, trimAndReplacePlus } from '../../../shared/utils';
|
|
30
30
|
import { PDFContext } from '../../PDFContainer';
|
|
@@ -50,7 +50,7 @@ function fetchContactBySSO(apolloClient, accountNumber, ssoUsername) {
|
|
|
50
50
|
export function CaseContactPhoneNumber() {
|
|
51
51
|
var _a;
|
|
52
52
|
const apolloClient = useApolloClient();
|
|
53
|
-
const { phoneCountryCode = '', phoneAreaCodePrefixLineNumber = '', caseNumber, contactSSOName, accountNumberRef, suppliedPhoneNumberVerified, isCaseOwnerUpdating, hasLoggedInUserConfirmedPhoneNumber, isCasePhoneUpdating, } = useCaseSelector((state) => ({
|
|
53
|
+
const { phoneCountryCode = '', phoneAreaCodePrefixLineNumber = '', caseNumber, contactSSOName, accountNumberRef, suppliedPhoneNumberVerified, isCaseOwnerUpdating, hasLoggedInUserConfirmedPhoneNumber, isCasePhoneUpdating, existingCaseDetails, } = useCaseSelector((state) => ({
|
|
54
54
|
phoneCountryCode: state.caseDetails.phoneCountryCode || '',
|
|
55
55
|
phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber || '',
|
|
56
56
|
caseNumber: state.caseDetails.caseNumber,
|
|
@@ -60,6 +60,7 @@ export function CaseContactPhoneNumber() {
|
|
|
60
60
|
isCaseOwnerUpdating: state.isCaseOwnerUpdating,
|
|
61
61
|
hasLoggedInUserConfirmedPhoneNumber: state.hasLoggedInUserConfirmedPhoneNumber,
|
|
62
62
|
isCasePhoneUpdating: state.isCasePhoneUpdating,
|
|
63
|
+
existingCaseDetails: state.caseDetails,
|
|
63
64
|
}), isEqual);
|
|
64
65
|
const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
|
|
65
66
|
const canEditCase = useCanEditCase();
|
|
@@ -102,8 +103,10 @@ export function CaseContactPhoneNumber() {
|
|
|
102
103
|
const phoneLine = (_a = getPhoneObj(localFullPhoneState)) === null || _a === void 0 ? void 0 : _a.phoneLine;
|
|
103
104
|
const countryCode = (_b = getPhoneObj(localFullPhoneState)) === null || _b === void 0 ? void 0 : _b.countryCode;
|
|
104
105
|
try {
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, caseNumber, {
|
|
107
|
+
phoneCountryCode: countryCode,
|
|
108
|
+
phoneAreaCodePrefixLineNumber: phoneLine,
|
|
109
|
+
}, false, { existingCaseDetails });
|
|
107
110
|
setIsSavedClicked(false);
|
|
108
111
|
setCaseState(caseDispatch, { isCasePhoneUpdating: false });
|
|
109
112
|
ToastNotification.addSuccessMessage(t(`Phone number has been successfully updated`));
|
|
@@ -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,sBA+YrC"}
|