@rh-support/troubleshoot 2.6.333 → 2.6.334
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/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/ProductVersion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +4 -2
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +70 -6
- 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/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/reducers/CaseConstNTypes.d.ts +2 -0
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +1 -0
- package/lib/esm/reducers/CaseHelpers.js +1 -1
- 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,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
|
});
|
|
@@ -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":"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,qBAkbrC;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -123,7 +123,7 @@ function ProductNVersion(props) {
|
|
|
123
123
|
}
|
|
124
124
|
};
|
|
125
125
|
const updateProductVerstion = (selectedProduct, selectedVersion) => __awaiter(this, void 0, void 0, function* () {
|
|
126
|
-
var _a, _b
|
|
126
|
+
var _a, _b;
|
|
127
127
|
let onlyVersionChanged = false;
|
|
128
128
|
try {
|
|
129
129
|
if (product === selectedProduct) {
|
|
@@ -135,7 +135,9 @@ function ProductNVersion(props) {
|
|
|
135
135
|
const serviceLevels = !onlyVersionChanged
|
|
136
136
|
? resolveProductServiceLevelsForAccount(selectedAccountDetails.data, allProducts.data.productsResult, selectedProduct)
|
|
137
137
|
: undefined;
|
|
138
|
-
yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, caseNumber, Object.assign(Object.assign(Object.assign({ product: selectedProduct, version: selectedVersion }, (selectedVersionId ? { productId: selectedVersionId } : {})), (!onlyVersionChanged
|
|
138
|
+
yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, caseNumber, Object.assign(Object.assign(Object.assign({ product: selectedProduct, version: selectedVersion }, (selectedVersionId ? { productId: selectedVersionId } : {})), (!onlyVersionChanged && (serviceLevels === null || serviceLevels === void 0 ? void 0 : serviceLevels.defaultEntitlementId)
|
|
139
|
+
? { entitlementId: serviceLevels.defaultEntitlementId }
|
|
140
|
+
: {})), (!onlyVersionChanged && (serviceLevels === null || serviceLevels === void 0 ? void 0 : serviceLevels.entitlementSla)
|
|
139
141
|
? { entitlementSla: serviceLevels.entitlementSla }
|
|
140
142
|
: {})), false, { existingCaseDetails });
|
|
141
143
|
if (!onlyVersionChanged) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumber.tsx"],"names":[],"mappings":"AAQA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAsC/D,wBAAgB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"ContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumber.tsx"],"names":[],"mappings":"AAQA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAsC/D,wBAAgB,kBAAkB,sBAwZjC"}
|
|
@@ -78,6 +78,7 @@ export function ContactPhoneNumber() {
|
|
|
78
78
|
};
|
|
79
79
|
const onPhoneChange = (fullPhone) => {
|
|
80
80
|
setLocalFullPhone(checkingPlusInLocalFullPhone(fullPhone));
|
|
81
|
+
setCaseState(caseDispatch, { hasUserUpdatedSuppliedPhone: true });
|
|
81
82
|
if (!shouldNotSetPhoneCountryCode) {
|
|
82
83
|
setCaseDetails(caseDispatch, {
|
|
83
84
|
phoneAreaCodePrefixLineNumber: getPhoneObj(fullPhone).phoneLine,
|
|
@@ -89,12 +90,17 @@ export function ContactPhoneNumber() {
|
|
|
89
90
|
setCaseState(caseDispatch, { shouldNotSetPhoneCountryCode: false });
|
|
90
91
|
}
|
|
91
92
|
setCaseDetails(caseDispatch, {
|
|
93
|
+
// TODO: Temporary — do not prepend + for portal phone without country code.
|
|
94
|
+
phoneAreaCodePrefixLineNumber: fullPhone.trim().replace(/^\+/, ''),
|
|
95
|
+
/* TODO: Revert to previous logic after phone format handling is finalized.
|
|
92
96
|
phoneAreaCodePrefixLineNumber: checkingPlusInLocalFullPhone(fullPhone),
|
|
97
|
+
*/
|
|
93
98
|
phoneCountryCode: '',
|
|
94
99
|
});
|
|
95
100
|
}
|
|
96
101
|
};
|
|
97
102
|
const onCountryCodeChange = (phoneCountryCode) => {
|
|
103
|
+
setCaseState(caseDispatch, { hasUserUpdatedSuppliedPhone: true });
|
|
98
104
|
setCaseDetails(caseDispatch, { phoneCountryCode });
|
|
99
105
|
};
|
|
100
106
|
const maxLengthErrorMessage = t('Phone number cannot be more than {{limit}} digits.', {
|
|
@@ -135,6 +141,7 @@ export function ContactPhoneNumber() {
|
|
|
135
141
|
setLocalFullPhone('');
|
|
136
142
|
setCaseState(caseDispatch, { isCasePhoneUpdating: true });
|
|
137
143
|
const initContactPhoneNumber = () => __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
var _a, _b;
|
|
138
145
|
let _phoneAreaCodePrefixLineNumber;
|
|
139
146
|
let _phoneCountryCode;
|
|
140
147
|
let _suppliedPhoneNumberVerified;
|
|
@@ -152,20 +159,41 @@ export function ContactPhoneNumber() {
|
|
|
152
159
|
}
|
|
153
160
|
else {
|
|
154
161
|
// User is openning a case for the first time
|
|
155
|
-
|
|
162
|
+
/* TODO: Revert to previous logic after phone format handling is finalized.
|
|
163
|
+
const phoneLength = trimAndReplacePlus(removeAllChars(loggedInUser.data.phone!)).length;
|
|
164
|
+
|
|
156
165
|
// For first time user whose phone is fetched from portal without country code
|
|
157
166
|
// For phone length less or equal to 10 country code shouldn't be fetched to avoid faulty phone population
|
|
158
167
|
if (phoneLength > 10) {
|
|
159
|
-
const phoneLine = getPhoneObj(loggedInUser.data.phone).phoneLine || '';
|
|
160
|
-
const countryCode = getPhoneObj(loggedInUser.data.phone).countryCode;
|
|
168
|
+
const phoneLine = getPhoneObj(loggedInUser.data.phone!).phoneLine || '';
|
|
169
|
+
const countryCode = getPhoneObj(loggedInUser.data.phone!).countryCode;
|
|
170
|
+
|
|
161
171
|
_phoneAreaCodePrefixLineNumber = phoneLine;
|
|
162
172
|
_phoneCountryCode = countryCode;
|
|
173
|
+
} else {
|
|
174
|
+
setCaseState(caseDispatch, {
|
|
175
|
+
shouldNotSetPhoneCountryCode: true,
|
|
176
|
+
});
|
|
177
|
+
_phoneAreaCodePrefixLineNumber = loggedInUser.data.phone!;
|
|
178
|
+
_phoneCountryCode = '';
|
|
179
|
+
setPortalPhone(loggedInUser.data.phone!);
|
|
180
|
+
}
|
|
181
|
+
*/
|
|
182
|
+
// TODO: Temporary — only parse country code from +{countryCode}-{phoneLine} format
|
|
183
|
+
const explicitPhoneMatch = (_a = loggedInUser.data.phone) === null || _a === void 0 ? void 0 : _a.trim().match(/^\+(\d+)-(.+)$/);
|
|
184
|
+
if (explicitPhoneMatch) {
|
|
185
|
+
_phoneCountryCode = `+${explicitPhoneMatch[1]}`;
|
|
186
|
+
_phoneAreaCodePrefixLineNumber = explicitPhoneMatch[2];
|
|
163
187
|
}
|
|
164
188
|
else {
|
|
165
189
|
setCaseState(caseDispatch, {
|
|
166
190
|
shouldNotSetPhoneCountryCode: true,
|
|
167
191
|
});
|
|
168
|
-
|
|
192
|
+
// TODO: Temporary — strip leading + when phone is not in +{countryCode}-{phoneLine} format.
|
|
193
|
+
_phoneAreaCodePrefixLineNumber = loggedInUser.data.phone.replace(/^\+/, '');
|
|
194
|
+
/* TODO: Revert to previous logic after phone format handling is finalized.
|
|
195
|
+
_phoneAreaCodePrefixLineNumber = loggedInUser.data.phone!;
|
|
196
|
+
*/
|
|
169
197
|
_phoneCountryCode = '';
|
|
170
198
|
setPortalPhone(loggedInUser.data.phone);
|
|
171
199
|
}
|
|
@@ -184,13 +212,31 @@ export function ContactPhoneNumber() {
|
|
|
184
212
|
setIsFetchingSso(true);
|
|
185
213
|
const selectedContact = yield fetchContactBySSO(apolloClient, accountNumberRef, contactSSOName);
|
|
186
214
|
setIsFetchingSso(false);
|
|
215
|
+
/* TODO: Revert to previous logic after phone format handling is finalized.
|
|
187
216
|
const phoneLength = trimAndReplacePlus(removeAllChars(selectedContact.phone)).length;
|
|
217
|
+
|
|
188
218
|
if (phoneLength > 10) {
|
|
189
219
|
_phoneAreaCodePrefixLineNumber = getPhoneObj(selectedContact.phone).phoneLine || '';
|
|
190
220
|
_phoneCountryCode = getPhoneObj(selectedContact.phone).countryCode || '';
|
|
221
|
+
} else {
|
|
222
|
+
_phoneAreaCodePrefixLineNumber = selectedContact.phone;
|
|
223
|
+
_phoneCountryCode = '';
|
|
224
|
+
setCaseState(caseDispatch, { shouldNotSetPhoneCountryCode: true });
|
|
225
|
+
setPortalPhone(selectedContact.phone);
|
|
226
|
+
}
|
|
227
|
+
*/
|
|
228
|
+
// TODO: Temporary — only parse country code from +{countryCode}-{phoneLine} format (e.g. +93-895674341).
|
|
229
|
+
const explicitPhoneMatch = (_b = selectedContact.phone) === null || _b === void 0 ? void 0 : _b.trim().match(/^\+(\d+)-(.+)$/);
|
|
230
|
+
if (explicitPhoneMatch) {
|
|
231
|
+
_phoneCountryCode = `+${explicitPhoneMatch[1]}`;
|
|
232
|
+
_phoneAreaCodePrefixLineNumber = explicitPhoneMatch[2];
|
|
191
233
|
}
|
|
192
234
|
else {
|
|
235
|
+
// TODO: Temporary — strip leading + when phone is not in +{countryCode}-{phoneLine} format.
|
|
236
|
+
_phoneAreaCodePrefixLineNumber = selectedContact.phone.replace(/^\+/, '');
|
|
237
|
+
/* TODO: Revert to previous logic after phone format handling is finalized.
|
|
193
238
|
_phoneAreaCodePrefixLineNumber = selectedContact.phone;
|
|
239
|
+
*/
|
|
194
240
|
_phoneCountryCode = '';
|
|
195
241
|
setCaseState(caseDispatch, { shouldNotSetPhoneCountryCode: true });
|
|
196
242
|
setPortalPhone(selectedContact.phone);
|
|
@@ -210,9 +256,19 @@ export function ContactPhoneNumber() {
|
|
|
210
256
|
phoneCountryCode: _phoneCountryCode,
|
|
211
257
|
suppliedPhoneNumberVerified: _suppliedPhoneNumberVerified,
|
|
212
258
|
});
|
|
259
|
+
// TODO: Temporary — do not prepend + when country code is not set.
|
|
260
|
+
const _localFullPhone = isEmpty(_phoneCountryCode)
|
|
261
|
+
? (_phoneAreaCodePrefixLineNumber === null || _phoneAreaCodePrefixLineNumber === void 0 ? void 0 : _phoneAreaCodePrefixLineNumber.trim()) || ''
|
|
262
|
+
: checkingPlusInLocalFullPhone(`${_phoneCountryCode} ${_phoneAreaCodePrefixLineNumber}`);
|
|
263
|
+
/* TODO: Revert to previous logic after phone format handling is finalized.
|
|
213
264
|
let _localFullPhone = _phoneCountryCode + ' ' + _phoneAreaCodePrefixLineNumber;
|
|
214
265
|
setLocalFullPhone(checkingPlusInLocalFullPhone(_localFullPhone));
|
|
215
|
-
|
|
266
|
+
*/
|
|
267
|
+
setLocalFullPhone(_localFullPhone);
|
|
268
|
+
setCaseState(caseDispatch, {
|
|
269
|
+
isCasePhoneUpdating: false,
|
|
270
|
+
hasUserUpdatedSuppliedPhone: false,
|
|
271
|
+
});
|
|
216
272
|
});
|
|
217
273
|
// if phone not initialized with portal and user contact value, initialize it else populate phone inputbox
|
|
218
274
|
if (isEmpty(phoneAreaCodePrefixLineNumber) && isEmpty(phoneCountryCode)) {
|
|
@@ -265,7 +321,15 @@ export function ContactPhoneNumber() {
|
|
|
265
321
|
phoneLength <= 10) {
|
|
266
322
|
setPortalPhone(portalPhone);
|
|
267
323
|
}
|
|
268
|
-
|
|
324
|
+
// TODO: Temporary — do not prepend + when country code is not set.
|
|
325
|
+
setLocalFullPhone(isEmpty(phoneCountryCode)
|
|
326
|
+
? (phoneAreaCodePrefixLineNumber === null || phoneAreaCodePrefixLineNumber === void 0 ? void 0 : phoneAreaCodePrefixLineNumber.trim()) || ''
|
|
327
|
+
: checkingPlusInLocalFullPhone((phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber).trim()));
|
|
328
|
+
/* TODO: Revert to previous logic after phone format handling is finalized.
|
|
329
|
+
setLocalFullPhone(
|
|
330
|
+
checkingPlusInLocalFullPhone((phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber).trim())
|
|
331
|
+
);
|
|
332
|
+
*/
|
|
269
333
|
setCaseState(caseDispatch, { isCasePhoneUpdating: false });
|
|
270
334
|
}
|
|
271
335
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentHelper.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/fileUpload/reducer/AttachmentHelper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAAC;AAC3F,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AAEvF,OAAO,EACH,iBAAiB,
|
|
1
|
+
{"version":3,"file":"AttachmentHelper.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/fileUpload/reducer/AttachmentHelper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAAC;AAC3F,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AAEvF,OAAO,EACH,iBAAiB,EAWpB,MAAM,mBAAmB,CAAC;AAO3B,OAAO,EACH,uBAAuB,EAEvB,6BAA6B,EAK7B,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,eAAe,EAMf,qBAAqB,EACxB,MAAM,qBAAqB,CAAC;AAG7B,eAAO,MAAM,MAAM,GACd,6BAA6B,6BAA6B,EAAE,aAAa,OAAO,EAAE,mBAAiB,MACnG,eAAe,IAAI,EAAE,SA+BrB,CAAC;AAiBN,eAAO,MAAM,oBAAoB,GAAI,QAAQ,MAAM,uDAAwD,CAAC;AAC5G,eAAO,MAAM,iBAAiB,GAAI,QAAQ,MAAM,oDAAqD,CAAC;AACtG,eAAO,MAAM,wBAAwB,GAAI,QAAQ,MAAM,2DAA4D,CAAC;AAC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AS,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,iBAAiB,EAChC,gBAAgB,CAAC,EAAE,MAAM,iBA4E5B;AAED,wBAAsB,uBAAuB,CAAC,QAAQ,KAAA,EAAE,SAAS,EAAE,MAAM,iBA+CxE;AAED,wBAAgB,+BAA+B,CAAC,UAAU,EAAE,UAAU,EAAE,WAEvE;AAED,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,UAAU,EAAE,WAKzD;AAED,eAAO,MAAM,uBAAuB,GAAI,YAAY,UAAU,KAAG,OAShE,CAAC;AAKF,eAAO,MAAM,2BAA2B,UAOvC,CAAC;AAEF,eAAO,MAAM,8BAA8B,GAAI,oBAAoB,UAAU,EAAE,YAE9E,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,aAAQ,SAUvC,CAAC"}
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { Config, pcm, sessionAttachments } from '@cee-eng/hydrajs';
|
|
11
11
|
import { ToastNotification } from '@rh-support/components';
|
|
12
|
-
import { CaseAttachmentUploadError, fetchCaseDetailsByCaseNumber, GET_CONTENT_DOCUMENT_IDS, getText, MultipartUploadError, pendoTrackEvent, pollAttachmentUploadStatus, pollContentVersionStatus, uploadCaseAttachment, } from '@rh-support/utils';
|
|
12
|
+
import { CaseAttachmentUploadError, deleteCaseAttachment, fetchCaseDetailsByCaseNumber, GET_CONTENT_DOCUMENT_IDS, getText, MultipartUploadError, pendoTrackEvent, pollAttachmentUploadStatus, pollContentVersionStatus, uploadCaseAttachment, } from '@rh-support/utils';
|
|
13
13
|
import find from 'lodash/find';
|
|
14
14
|
import forEach from 'lodash/forEach';
|
|
15
15
|
import includes from 'lodash/includes';
|
|
@@ -275,7 +275,9 @@ needsAnalyzing = false, isSessionId = false, slowUploadConfig = {}, apolloClient
|
|
|
275
275
|
parts: localFile.uploadProgress.multipartResumeState.parts,
|
|
276
276
|
completedParts: localFile.uploadProgress.multipartResumeState.completedParts,
|
|
277
277
|
}
|
|
278
|
-
: undefined)
|
|
278
|
+
: undefined, (initAttachmentId) => {
|
|
279
|
+
updateAttachmentIdForFile(dispatch, initAttachmentId, index);
|
|
280
|
+
});
|
|
279
281
|
if (userAborted) {
|
|
280
282
|
return;
|
|
281
283
|
}
|
|
@@ -321,6 +323,14 @@ needsAnalyzing = false, isSessionId = false, slowUploadConfig = {}, apolloClient
|
|
|
321
323
|
updateAttachmentIdForFile(dispatch, attachmentIdFromError, index);
|
|
322
324
|
}
|
|
323
325
|
if (isUserAbort) {
|
|
326
|
+
if (!isSessionId && attachmentIdFromError) {
|
|
327
|
+
try {
|
|
328
|
+
yield deleteCaseAttachment(idToUploadTo, attachmentIdFromError);
|
|
329
|
+
}
|
|
330
|
+
catch (_c) {
|
|
331
|
+
// Best-effort: file stays in queue as ABORTED for retry
|
|
332
|
+
}
|
|
333
|
+
}
|
|
324
334
|
const resumeState = error instanceof MultipartUploadError ? error.resumeData : undefined;
|
|
325
335
|
updateUploadMetadata(dispatch, index, Object.assign({ uploadStatus: UploadStatusConstants.aborted, uploadErrorMessage: '', onAbort: undefined, percentUploaded: 0 }, (resumeState && resumeState.completedParts.length > 0 ? { multipartResumeState: resumeState } : {})));
|
|
326
336
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentReducer.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/fileUpload/reducer/AttachmentReducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AACrH,OAAO,EAAE,MAAM,EAAE,MAAM,yCAAyC,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAMzD,oBAAY,0BAA0B;IAClC,gBAAgB,qBAAqB;IACrC,mBAAmB,wBAAwB;IAC3C,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,WAAW,GAAG,OAAO,CAAC,0BAA0B,EAAE,sBAAsB,CAAC,CAAC;AAC/E,MAAM,MAAM,6BAA6B,GAAG,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"AttachmentReducer.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/fileUpload/reducer/AttachmentReducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AACrH,OAAO,EAAE,MAAM,EAAE,MAAM,yCAAyC,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAMzD,oBAAY,0BAA0B;IAClC,gBAAgB,qBAAqB;IACrC,mBAAmB,wBAAwB;IAC3C,eAAe,oBAAoB;IACnC,eAAe,oBAAoB;IACnC,sBAAsB,2BAA2B;IACjD,yBAAyB,8BAA8B;IACvD,sBAAsB,2BAA2B;IACjD,wBAAwB,6BAA6B;IACrD,mCAAmC,wCAAwC;IAC3E,yBAAyB,8BAA8B;CAC1D;AAED,oBAAY,qBAAqB;IAC7B,cAAc,qBAAqB;IACnC,iBAAiB,wBAAwB;IACzC,eAAe,sBAAsB;IACrC,kBAAkB,yBAAyB;IAC3C,mBAAmB,0BAA0B;IAC7C,sBAAsB,6BAA6B;IACnD,cAAc,qBAAqB;IACnC,iBAAiB,wBAAwB;IACzC,kBAAkB,0BAA0B;IAC5C,qBAAqB,6BAA6B;IAClD,YAAY,mBAAmB;IAC/B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,mBAAmB,wBAAwB;CAC9C;AAED,oBAAY,uBAAuB;IAC/B,kBAAkB,yBAAyB;IAC3C,iBAAiB,yBAAyB;IAC1C,gBAAgB,sBAAsB;IACtC,cAAc,oBAAoB;IAClC,eAAe,qBAAqB;CACvC;AAED,MAAM,WAAW,aAAa;IAC1B,Y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AAM,yBAAyB,GAClC,UAAU,6BAA6B,EACvC,cAAc,MAAM,EACpB,iBAAiB,MAAM,SAM1B,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAC/B,UAAU,6BAA6B,EACvC,kBAAkB,OAAO,CAAC,iBAAiB,CAAC,EAC5C,iBAAiB,MAAM,SAM1B,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACjC,UAAU,6BAA6B,EACvC,gBAAgB,OAAO,CAAC,eAAe,CAAC,EACxC,iBAAiB,MAAM,SAM1B,CAAC"}
|
|
@@ -60,6 +60,7 @@ export const initialAttachmentState = {
|
|
|
60
60
|
includeAnalysisResults: true,
|
|
61
61
|
showUploadingOnSlowConnectionMsg: false,
|
|
62
62
|
};
|
|
63
|
+
const getLocalFileAtIndex = (selectedLocalFiles, index) => index >= 0 && index < selectedLocalFiles.length ? selectedLocalFiles[index] : undefined;
|
|
63
64
|
export const attachmentReducer = (pState, action) => {
|
|
64
65
|
switch (action.type) {
|
|
65
66
|
case AttachmentReducerConstants.caseFileSelected: {
|
|
@@ -79,6 +80,9 @@ export const attachmentReducer = (pState, action) => {
|
|
|
79
80
|
case AttachmentReducerConstants.caseLocalFileEdited: {
|
|
80
81
|
const editedLocalFile = action.payload.editedLocalFile;
|
|
81
82
|
const indexToEdit = action.payload.fileIndexToEdit;
|
|
83
|
+
if (!getLocalFileAtIndex(pState.caseFiles.selectedLocalFiles, indexToEdit)) {
|
|
84
|
+
return pState;
|
|
85
|
+
}
|
|
82
86
|
const newState = Object.assign({}, pState);
|
|
83
87
|
const newCaseFiles = Object.assign({}, newState.caseFiles);
|
|
84
88
|
const selectedLocalFiles = [...newState.caseFiles.selectedLocalFiles];
|
|
@@ -130,6 +134,9 @@ export const attachmentReducer = (pState, action) => {
|
|
|
130
134
|
}
|
|
131
135
|
case AttachmentReducerConstants.updateAttachmentIdForFile: {
|
|
132
136
|
const indexToEdit = action.payload.fileIndexToEdit;
|
|
137
|
+
if (!getLocalFileAtIndex(pState.caseFiles.selectedLocalFiles, indexToEdit)) {
|
|
138
|
+
return pState;
|
|
139
|
+
}
|
|
133
140
|
const newState = Object.assign({}, pState);
|
|
134
141
|
const newCaseFiles = Object.assign({}, newState.caseFiles);
|
|
135
142
|
const selectedLocalFiles = [...newState.caseFiles.selectedLocalFiles];
|
|
@@ -140,6 +147,9 @@ export const attachmentReducer = (pState, action) => {
|
|
|
140
147
|
}
|
|
141
148
|
case AttachmentReducerConstants.updateAnalysisMetadata: {
|
|
142
149
|
const indexToEdit = action.payload.fileIndexToEdit;
|
|
150
|
+
if (!getLocalFileAtIndex(pState.caseFiles.selectedLocalFiles, indexToEdit)) {
|
|
151
|
+
return pState;
|
|
152
|
+
}
|
|
143
153
|
const newState = Object.assign({}, pState);
|
|
144
154
|
const newCaseFiles = Object.assign({}, newState.caseFiles);
|
|
145
155
|
const selectedLocalFiles = [...newState.caseFiles.selectedLocalFiles];
|
|
@@ -150,6 +160,9 @@ export const attachmentReducer = (pState, action) => {
|
|
|
150
160
|
}
|
|
151
161
|
case AttachmentReducerConstants.udpateFileUploadMetadata: {
|
|
152
162
|
const indexToEdit = action.payload.fileIndexToEdit;
|
|
163
|
+
if (!getLocalFileAtIndex(pState.caseFiles.selectedLocalFiles, indexToEdit)) {
|
|
164
|
+
return pState;
|
|
165
|
+
}
|
|
153
166
|
const newState = Object.assign({}, pState);
|
|
154
167
|
const newCaseFiles = Object.assign({}, newState.caseFiles);
|
|
155
168
|
const selectedLocalFiles = [...newState.caseFiles.selectedLocalFiles];
|
|
@@ -39,12 +39,16 @@ export interface IGetCaseCommentsQueryResponse {
|
|
|
39
39
|
};
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
export interface
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
export interface ICaseCommentsFilter {
|
|
43
|
+
Case__c: {
|
|
44
|
+
eq: string;
|
|
45
|
+
};
|
|
46
|
+
Visibility__c?: {
|
|
47
|
+
eq: string;
|
|
47
48
|
};
|
|
49
|
+
}
|
|
50
|
+
export interface ICaseCommentsVariables {
|
|
51
|
+
filter: ICaseCommentsFilter;
|
|
48
52
|
orderBy?: Record<string, {
|
|
49
53
|
order: 'ASC' | 'DESC';
|
|
50
54
|
}>;
|
|
@@ -57,6 +61,8 @@ export interface IUseCaseCommentsOptions {
|
|
|
57
61
|
order: 'ASC' | 'DESC';
|
|
58
62
|
}>;
|
|
59
63
|
first?: number;
|
|
64
|
+
/** When true, only Public comments are fetched (external / customer users). */
|
|
65
|
+
publicOnly?: boolean;
|
|
60
66
|
}
|
|
61
67
|
export interface ICreateCaseCommentInput {
|
|
62
68
|
Case__c: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useCaseComments/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACnC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,uBAAuB;IACpC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,wBAAwB;IACrC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,qBAAqB;IAClC,IAAI,EAAE,sBAAsB,CAAC;CAChC;AAED,MAAM,WAAW,0BAA0B;IACvC,IAAI,EAAE,sBAAsB,CAAC;CAChC;AAED,MAAM,WAAW,gBAAgB;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,sBAAsB,CAAC;IAC7B,OAAO,EAAE,sBAAsB,CAAC;IAChC,SAAS,EAAE,qBAAqB,CAAC;IACjC,aAAa,EAAE,uBAAuB,CAAC;IACvC,cAAc,EAAE,uBAAuB,CAAC;IACxC,gBAAgB,EAAE,sBAAsB,CAAC;IACzC,aAAa,EAAE,wBAAwB,CAAC;IACxC,cAAc,EAAE,0BAA0B,CAAC;IAC3C,WAAW,EAAE,sBAAsB,CAAC;CACvC;AAED,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,gBAAgB,CAAC;CAC1B;AAED,MAAM,WAAW,uBAAuB;IACpC,KAAK,EAAE,gBAAgB,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,6BAA6B;IAC1C,oBAAoB,EAAE;QAClB,KAAK,EAAE;YACH,2BAA2B,EAAE,uBAAuB,CAAC;SACxD,CAAC;KACL,CAAC;CACL;AAED,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useCaseComments/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACnC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,uBAAuB;IACpC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,wBAAwB;IACrC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,qBAAqB;IAClC,IAAI,EAAE,sBAAsB,CAAC;CAChC;AAED,MAAM,WAAW,0BAA0B;IACvC,IAAI,EAAE,sBAAsB,CAAC;CAChC;AAED,MAAM,WAAW,gBAAgB;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,sBAAsB,CAAC;IAC7B,OAAO,EAAE,sBAAsB,CAAC;IAChC,SAAS,EAAE,qBAAqB,CAAC;IACjC,aAAa,EAAE,uBAAuB,CAAC;IACvC,cAAc,EAAE,uBAAuB,CAAC;IACxC,gBAAgB,EAAE,sBAAsB,CAAC;IACzC,aAAa,EAAE,wBAAwB,CAAC;IACxC,cAAc,EAAE,0BAA0B,CAAC;IAC3C,WAAW,EAAE,sBAAsB,CAAC;CACvC;AAED,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,gBAAgB,CAAC;CAC1B;AAED,MA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@@ -9,8 +9,9 @@ interface IUseCaseCommentsReturn {
|
|
|
9
9
|
/**
|
|
10
10
|
* Fetches case comments from the Salesforce GraphQL API for a given case ID.
|
|
11
11
|
* Supports custom sort ordering and pagination clamping (1–2000 records).
|
|
12
|
+
* External / customer users (no VIEW_PRIVATE_COMMENT) only receive Public comments.
|
|
12
13
|
* Returns mapped ICaseComment[] along with loading, error, and refetch handles.
|
|
13
14
|
*/
|
|
14
|
-
export declare function useCaseComments({ caseId, skip, orderBy, first }: IUseCaseCommentsOptions): IUseCaseCommentsReturn;
|
|
15
|
+
export declare function useCaseComments({ caseId, skip, orderBy, first, publicOnly, }: IUseCaseCommentsOptions): IUseCaseCommentsReturn;
|
|
15
16
|
export {};
|
|
16
17
|
//# sourceMappingURL=useCaseComments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCaseComments.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useCaseComments/useCaseComments.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"useCaseComments.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useCaseComments/useCaseComments.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAOvE,OAAO,EAAuB,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvE,UAAU,sBAAsB;IAC5B,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;IACzB,OAAO,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;CACnC;AAeD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAC5B,MAAM,EACN,IAAI,EACJ,OAAO,EACP,KAAK,EACL,UAAU,GACb,EAAE,uBAAuB,GAAG,sBAAsB,CAqBlD"}
|
|
@@ -1,19 +1,32 @@
|
|
|
1
1
|
import { useQuery } from '@apollo/client/react';
|
|
2
|
+
import { ability, CaseDiscussionFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
2
3
|
import clamp from 'lodash/clamp';
|
|
3
4
|
import { useMemo } from 'react';
|
|
4
5
|
import { GET_CASE_COMMENTS } from './caseCommentsQuery';
|
|
5
6
|
import { mapCaseCommentsResponse } from './mapCaseComment';
|
|
6
7
|
const MAX_FIRST = 2000;
|
|
7
8
|
const MIN_FIRST = 1;
|
|
9
|
+
function buildCaseCommentsFilter(caseId, publicOnly) {
|
|
10
|
+
if (publicOnly) {
|
|
11
|
+
return {
|
|
12
|
+
Case__c: { eq: caseId },
|
|
13
|
+
Visibility__c: { eq: 'Public' },
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
return { Case__c: { eq: caseId } };
|
|
17
|
+
}
|
|
8
18
|
/**
|
|
9
19
|
* Fetches case comments from the Salesforce GraphQL API for a given case ID.
|
|
10
20
|
* Supports custom sort ordering and pagination clamping (1–2000 records).
|
|
21
|
+
* External / customer users (no VIEW_PRIVATE_COMMENT) only receive Public comments.
|
|
11
22
|
* Returns mapped ICaseComment[] along with loading, error, and refetch handles.
|
|
12
23
|
*/
|
|
13
|
-
export function useCaseComments({ caseId, skip, orderBy, first }) {
|
|
24
|
+
export function useCaseComments({ caseId, skip, orderBy, first, publicOnly, }) {
|
|
25
|
+
const canSeePrivateComments = ability.can(resourceActions.PATCH, resources.CASE_COMMENTS, CaseDiscussionFields.VIEW_PRIVATE_COMMENT);
|
|
26
|
+
const shouldFilterPublicOnly = publicOnly !== null && publicOnly !== void 0 ? publicOnly : !canSeePrivateComments;
|
|
14
27
|
const { data, loading, error, refetch } = useQuery(GET_CASE_COMMENTS, {
|
|
15
28
|
variables: {
|
|
16
|
-
filter:
|
|
29
|
+
filter: buildCaseCommentsFilter(caseId, shouldFilterPublicOnly),
|
|
17
30
|
orderBy: orderBy !== null && orderBy !== void 0 ? orderBy : { LastModifiedDate: { order: 'DESC' } },
|
|
18
31
|
first: clamp(first !== null && first !== void 0 ? first : MAX_FIRST, MIN_FIRST, MAX_FIRST),
|
|
19
32
|
},
|
|
@@ -294,6 +294,8 @@ export interface ICaseState {
|
|
|
294
294
|
isPostingRemoteRequestCommentCompleted?: boolean;
|
|
295
295
|
isPostingRemoteRequestCommentCompletedErrorMessage?: string | undefined;
|
|
296
296
|
isExistingPhoneNumber?: boolean;
|
|
297
|
+
/** True only when the user edits the case-owner phone input (not auto-prefill). */
|
|
298
|
+
hasUserUpdatedSuppliedPhone?: boolean;
|
|
297
299
|
hasLoggedInUserConfirmedPhoneNumber?: 'True' | 'False' | 'Deferred' | undefined;
|
|
298
300
|
shouldNotSetPhoneCountryCode?: boolean;
|
|
299
301
|
ftsContactSameAsOwner?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseConstNTypes.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseConstNTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EACH,aAAa,EACb,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,WAAW,EACX,aAAa,EAChB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACnF,OAAO,EAAwB,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CA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AM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0BAA0B,CAAC,EAAE,MAAM,CAAC;CACvC;AAED,MAAM,WAAW,sBAAuB,SAAQ,UAAU;CAAG;AAC7D,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,oBAAoB,EAAE,sBAAsB,CAAC,CAAC;AACpF,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;AAEhE,eAAO,MAAM,qCAAqC,+CAA+C,CAAC;AAClG,eAAO,MAAM,yCAAyC,+CAA+C,CAAC;AAEtG,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAA6C,CAAC;AAE9F,eAAO,MAAM,uBAAuB,UAAoC,CAAC;AACzE,eAAO,MAAM,eAAe,YAAY,CAAC"}
|
|
@@ -238,6 +238,7 @@ export const initialCaseState = {
|
|
|
238
238
|
isPostingRemoteRequestCommentCompleted: false,
|
|
239
239
|
isPostingRemoteRequestCommentCompletedErrorMessage: '',
|
|
240
240
|
isExistingPhoneNumber: false,
|
|
241
|
+
hasUserUpdatedSuppliedPhone: false,
|
|
241
242
|
hasLoggedInUserConfirmedPhoneNumber: 'False',
|
|
242
243
|
shouldNotSetPhoneCountryCode: false,
|
|
243
244
|
ftsContactSameAsOwner: false,
|
|
@@ -260,7 +260,7 @@ const assignOptionalIdentifiers = (casePayload, caseState) => {
|
|
|
260
260
|
casePayload.EntitlementId = caseState.selectedEntitlementId;
|
|
261
261
|
if (!isEmpty(caseState.selectedVersionId))
|
|
262
262
|
casePayload.ProductId = caseState.selectedVersionId;
|
|
263
|
-
if (!isEmpty(countryCode) && !isEmpty(phoneLine)) {
|
|
263
|
+
if (caseState.hasUserUpdatedSuppliedPhone && !isEmpty(countryCode) && !isEmpty(phoneLine)) {
|
|
264
264
|
casePayload.SuppliedPhone = `${countryCode} ${phoneLine}`;
|
|
265
265
|
}
|
|
266
266
|
if (!isEmpty(case_details.alternateId))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.334",
|
|
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.207",
|
|
56
|
+
"@rh-support/react-context": "2.5.302",
|
|
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.154",
|
|
59
|
+
"@rh-support/utils": "2.5.135",
|
|
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": "0ee7395e3f501d247910c0ac5f91a4f2e3195e07"
|
|
132
132
|
}
|