@rh-support/troubleshoot 2.6.86 → 2.6.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +130 -50
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +13 -10
- package/lib/esm/components/CaseInformation/OpenCaseIssue.d.ts +1 -0
- package/lib/esm/components/CaseInformation/OpenCaseIssue.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/OpenCaseIssue.js +6 -1
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +16 -2
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +1 -1
- package/lib/esm/i18n/template-de.d.ts +41 -2
- package/lib/esm/i18n/template-de.d.ts.map +1 -1
- package/lib/esm/i18n/template-de.js +41 -2
- package/lib/esm/i18n/template-es.d.ts +41 -2
- package/lib/esm/i18n/template-es.d.ts.map +1 -1
- package/lib/esm/i18n/template-es.js +41 -2
- package/lib/esm/i18n/template-fr.d.ts +41 -2
- package/lib/esm/i18n/template-fr.d.ts.map +1 -1
- package/lib/esm/i18n/template-fr.js +41 -2
- package/lib/esm/i18n/template-it.d.ts +41 -2
- package/lib/esm/i18n/template-it.d.ts.map +1 -1
- package/lib/esm/i18n/template-it.js +41 -2
- package/lib/esm/i18n/template-jp.d.ts +41 -2
- package/lib/esm/i18n/template-jp.d.ts.map +1 -1
- package/lib/esm/i18n/template-jp.js +41 -2
- package/lib/esm/i18n/template-ko.d.ts +41 -2
- package/lib/esm/i18n/template-ko.d.ts.map +1 -1
- package/lib/esm/i18n/template-ko.js +41 -2
- package/lib/esm/i18n/template-pt.d.ts +41 -2
- package/lib/esm/i18n/template-pt.d.ts.map +1 -1
- package/lib/esm/i18n/template-pt.js +41 -2
- package/lib/esm/i18n/template-ru.d.ts +6 -1
- package/lib/esm/i18n/template-ru.d.ts.map +1 -1
- package/lib/esm/i18n/template-ru.js +6 -1
- package/lib/esm/i18n/template-zh.d.ts +18 -0
- package/lib/esm/i18n/template-zh.d.ts.map +1 -1
- package/lib/esm/i18n/template-zh.js +18 -0
- package/lib/esm/scss/_pf-overrides.scss +8 -9
- package/package.json +4 -4
package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestEscalationModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestEscalationModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.tsx"],"names":[],"mappings":"AAyCA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAuBnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAID,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,qBAy+BnD"}
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { escalations, publicApi } from '@cee-eng/hydrajs';
|
|
11
11
|
import { Button, Form, FormGroup, FormHelperText, Grid, GridItem, HelperText, HelperTextItem, Modal, ModalBody, ModalHeader, ModalVariant, Radio, TextArea, TextInput, TimePicker, Title, ValidatedOptions, Wizard, WizardNav, WizardNavItem, WizardStep, } from '@patternfly/react-core';
|
|
12
|
-
import { AlertMessage, AlertType, PhoneInput, SingleSelectDropdown, ToastNotification, useFetch, } from '@rh-support/components';
|
|
12
|
+
import { AlertMessage, AlertType, COUNTRY_DATA, getPhoneObj, PhoneInput, SingleSelectDropdown, ToastNotification, useFetch, } from '@rh-support/components';
|
|
13
13
|
import { useGlobalStateContext } from '@rh-support/react-context';
|
|
14
14
|
import isEmpty from 'lodash/isEmpty';
|
|
15
15
|
import React, { useEffect, useState } from 'react';
|
|
@@ -18,13 +18,14 @@ import { useCaseDispatch } from '../../../context/CaseContext';
|
|
|
18
18
|
import { useCaseDetailsPageDispatchContext, useCaseDetailsPageStateContext, } from '../../../context/CaseDetailsPageContext';
|
|
19
19
|
import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../../context/CaseDiscussionTabContext';
|
|
20
20
|
import { CustomerGEOs } from '../../../enums/customerGEOs';
|
|
21
|
-
import { ESCALATION_SUBJECT_LENGTH_LIMIT, TIMEZONE_OPTIONS, } from '../../../reducers/CaseConstNTypes';
|
|
21
|
+
import { ESCALATION_SUBJECT_LENGTH_LIMIT, PHONE_LIMIT, TIMEZONE_OPTIONS, } from '../../../reducers/CaseConstNTypes';
|
|
22
22
|
import { fetchCaseEscalations } from '../../../reducers/CaseDetailsPageReducer';
|
|
23
23
|
import { updateDiscussionStateComments } from '../../../reducers/CaseDiscussionTabReducer';
|
|
24
24
|
import { checkForCaseStatusToggleOnAttachOrComment, fetchCaseDetails } from '../../../reducers/CaseReducer';
|
|
25
|
+
import { removeAllChars, trimAndReplacePlus } from '../../shared/utils';
|
|
25
26
|
const customerGEOKeys = Object.keys(CustomerGEOs);
|
|
26
27
|
export function RequestEscalationModal(props) {
|
|
27
|
-
var _a;
|
|
28
|
+
var _a, _b, _c, _d, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
28
29
|
const { globalMetadataState: { loggedInUser, loggedInUserRights }, } = useGlobalStateContext();
|
|
29
30
|
const { t } = useTranslation();
|
|
30
31
|
const [categories, setCategories] = useState([]);
|
|
@@ -48,6 +49,48 @@ export function RequestEscalationModal(props) {
|
|
|
48
49
|
const [hasLargeSubject, setHasLargeSubject] = useState(false);
|
|
49
50
|
const [submitButtonIsClicked, setSubmitSaveButtonIsClicked] = useState(false);
|
|
50
51
|
const [isPhoneInvalid, setIsPhoneInvalid] = useState(false);
|
|
52
|
+
const isCountryCodeValid = (countryCode) => {
|
|
53
|
+
// Check if the country code exists in the valid country codes list
|
|
54
|
+
if (!countryCode)
|
|
55
|
+
return false;
|
|
56
|
+
const normalizedCode = trimAndReplacePlus(countryCode);
|
|
57
|
+
if (isEmpty(normalizedCode))
|
|
58
|
+
return false;
|
|
59
|
+
return COUNTRY_DATA.some((country) => country[3] === normalizedCode);
|
|
60
|
+
};
|
|
61
|
+
const isPhoneNumberInvalid = (phoneNumber, countryCode) => {
|
|
62
|
+
var _a;
|
|
63
|
+
// Check if country code is given but phone number is empty/only has country code
|
|
64
|
+
return (!isEmpty(phoneNumber) &&
|
|
65
|
+
isEmpty((_a = removeAllChars(phoneNumber || '')) === null || _a === void 0 ? void 0 : _a.replace(trimAndReplacePlus(countryCode || ''), '')));
|
|
66
|
+
};
|
|
67
|
+
const isPhoneLineEmpty = (phoneNumber, countryCode) => {
|
|
68
|
+
var _a;
|
|
69
|
+
// Check if both country code and phone line are empty
|
|
70
|
+
return (isEmpty(trimAndReplacePlus(countryCode || '')) &&
|
|
71
|
+
isEmpty((_a = (phoneNumber || '')) === null || _a === void 0 ? void 0 : _a.replace(countryCode || '', '')));
|
|
72
|
+
};
|
|
73
|
+
const isPhoneNumberValid = (phoneNumber, countryCode) => {
|
|
74
|
+
const trimmedPhone = (phoneNumber || '').trim();
|
|
75
|
+
const phoneObject = getPhoneObj(trimmedPhone);
|
|
76
|
+
const fullPhone = phoneObject.countryCode + ' ' + phoneObject.phoneLine;
|
|
77
|
+
// Check for various invalid states
|
|
78
|
+
if (fullPhone.length > PHONE_LIMIT)
|
|
79
|
+
return false;
|
|
80
|
+
if (isPhoneLineEmpty(phoneNumber, countryCode))
|
|
81
|
+
return false;
|
|
82
|
+
if (isPhoneNumberInvalid(phoneNumber, countryCode))
|
|
83
|
+
return false;
|
|
84
|
+
if (isEmpty(trimAndReplacePlus(countryCode || '')))
|
|
85
|
+
return false;
|
|
86
|
+
if (!isCountryCodeValid(countryCode))
|
|
87
|
+
return false;
|
|
88
|
+
if (trimAndReplacePlus(trimmedPhone) === trimAndReplacePlus(countryCode || ''))
|
|
89
|
+
return false;
|
|
90
|
+
if (trimmedPhone.length < 5)
|
|
91
|
+
return false;
|
|
92
|
+
return true;
|
|
93
|
+
};
|
|
51
94
|
// Function to check if "to" time is after "from" time
|
|
52
95
|
const isValidTimeRange = (fromTime, toTime) => {
|
|
53
96
|
if (!fromTime || !toTime)
|
|
@@ -83,7 +126,8 @@ export function RequestEscalationModal(props) {
|
|
|
83
126
|
formState.preferredTimeTo) {
|
|
84
127
|
return (hasAllFields &&
|
|
85
128
|
isValidTimeRange(formState.preferredTimeFrom, formState.preferredTimeTo) &&
|
|
86
|
-
!isPhoneInvalid
|
|
129
|
+
!isPhoneInvalid &&
|
|
130
|
+
isPhoneNumberValid(formState.phoneNumber, formState.countryCode));
|
|
87
131
|
}
|
|
88
132
|
return hasAllFields;
|
|
89
133
|
};
|
|
@@ -190,7 +234,7 @@ export function RequestEscalationModal(props) {
|
|
|
190
234
|
const hour12 = hour % 12 || 12;
|
|
191
235
|
return `${hour12}:${minutes}${ampm}`;
|
|
192
236
|
};
|
|
193
|
-
const fullComment = t('### Request Management Escalation:\n\n**Subject**\n{{subject}}\n\n**Category**\n{{rmeCategory}}\n\n**Description**\n{{description}}\n\n**Expectations**\n{{expectations}}\n\n**Business
|
|
237
|
+
const fullComment = t('### Request Management Escalation:\n\n**Name**\n{{contactName}}\n\n**Title**\n{{contactTitle}}\n\n**Subject**\n{{subject}}\n\n**Category**\n{{rmeCategory}}\n\n**Description**\n{{description}}\n\n**Expectations**\n{{expectations}}\n\n**Business impact**\n{{businessImpactDescription}}\n\n**Contact preference**\n{{contactPreference}}{{phoneDetails}}\n\n', {
|
|
194
238
|
category: formState.rmeCategory,
|
|
195
239
|
subject: formState.subject,
|
|
196
240
|
description: formState.description,
|
|
@@ -269,25 +313,26 @@ export function RequestEscalationModal(props) {
|
|
|
269
313
|
// Validate current step
|
|
270
314
|
const isCurrentStepValid = () => {
|
|
271
315
|
if (activeStep.id === 'escalation-details') {
|
|
272
|
-
return (
|
|
273
|
-
|
|
274
|
-
|
|
316
|
+
return ((formState.rmeCategory || '').trim().length > 0 &&
|
|
317
|
+
(formState.geo || '').trim().length > 0 &&
|
|
318
|
+
(formState.subject || '').trim().length > 0 &&
|
|
275
319
|
!hasLargeSubject &&
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
320
|
+
(formState.description || '').trim().length > 0 &&
|
|
321
|
+
(formState.expectations || '').trim().length > 0 &&
|
|
322
|
+
(formState.businessImpactDescription || '').trim().length > 0);
|
|
279
323
|
}
|
|
280
324
|
else if (activeStep.id === 'contact-details') {
|
|
281
|
-
const baseValidation =
|
|
282
|
-
|
|
283
|
-
|
|
325
|
+
const baseValidation = (formState.contactName || '').trim().length > 0 &&
|
|
326
|
+
(formState.contactTitle || '').trim().length > 0 &&
|
|
327
|
+
(formState.contactPreference || '').trim().length > 0;
|
|
284
328
|
// Additional validation if call options are selected
|
|
285
329
|
if (formState.contactPreference === 'call-me' || formState.contactPreference === 'call-if-necessary') {
|
|
286
330
|
return (baseValidation &&
|
|
287
|
-
|
|
331
|
+
isPhoneNumberValid(formState.phoneNumber, formState.countryCode) &&
|
|
288
332
|
!isPhoneInvalid &&
|
|
289
|
-
|
|
290
|
-
|
|
333
|
+
(formState.preferredTimeFrom || '').trim().length > 0 &&
|
|
334
|
+
(formState.preferredTimeTo || '').trim().length > 0 &&
|
|
335
|
+
(formState.timezone || '').trim().length > 0);
|
|
291
336
|
}
|
|
292
337
|
return baseValidation;
|
|
293
338
|
}
|
|
@@ -311,7 +356,7 @@ export function RequestEscalationModal(props) {
|
|
|
311
356
|
setSubmitSaveButtonIsClicked(false);
|
|
312
357
|
goToPrevStep({});
|
|
313
358
|
}, isDisabled: isLoading, "data-tracking-id": "request-rme-back" }, t('Back'))),
|
|
314
|
-
React.createElement(Button, { variant: "primary", onClick: isLastStep ? handleSubmit : handleNext, isDisabled: isLoading || (submitButtonIsClicked && !isCurrentStepValid()), "data-tracking-id": isLastStep ? 'request-rme-submit' : 'request-rme-next' }, isLastStep ? t('Submit') : t('Next')),
|
|
359
|
+
React.createElement(Button, { variant: "primary", onClick: isLastStep ? handleSubmit : handleNext, isDisabled: isLoading || (submitButtonIsClicked && !isCurrentStepValid()), isLoading: isLoading, "data-tracking-id": isLastStep ? 'request-rme-submit' : 'request-rme-next' }, isLastStep ? t('Submit') : t('Next')),
|
|
315
360
|
React.createElement(Button, { variant: "link", onClick: onCancel, isDisabled: isLoading, "data-tracking-id": "request-rme-cancel" }, t('Cancel'))));
|
|
316
361
|
};
|
|
317
362
|
const escalationDetailsStep = (React.createElement(WizardStep, { id: "escalation-details", name: t('Escalation details') },
|
|
@@ -321,10 +366,10 @@ export function RequestEscalationModal(props) {
|
|
|
321
366
|
React.createElement(Grid, { hasGutter: true },
|
|
322
367
|
React.createElement(GridItem, { span: 6 },
|
|
323
368
|
React.createElement(FormGroup, { isRequired: true, label: t('Category'), fieldId: "escalation-category" },
|
|
324
|
-
React.createElement(SingleSelectDropdown, { id: "customer-category-select", ariaLabel: t('Category'), selected: selectedCategory, options: categoryOptions, isDisabled: false, isLoading: isCategoriesFetching, isInvalid: submitButtonIsClicked &&
|
|
369
|
+
React.createElement(SingleSelectDropdown, { id: "customer-category-select", ariaLabel: t('Category'), selected: selectedCategory, options: categoryOptions, isDisabled: false, isLoading: isCategoriesFetching, isInvalid: submitButtonIsClicked && !((_a = formState.rmeCategory) === null || _a === void 0 ? void 0 : _a.trim()), placeholder: t('Select an option that best fits'), onSelect: (option) => setCategoryState(option), isScrollable: true }))),
|
|
325
370
|
React.createElement(GridItem, { span: 6 },
|
|
326
371
|
React.createElement(FormGroup, { isRequired: true, label: t('My region'), fieldId: "escalation-region" },
|
|
327
|
-
React.createElement(SingleSelectDropdown, { ariaLabel: t('My region'), id: "customer-geo-select", selected: selectedGeo, options: geoOptions, isInvalid: submitButtonIsClicked &&
|
|
372
|
+
React.createElement(SingleSelectDropdown, { ariaLabel: t('My region'), id: "customer-geo-select", selected: selectedGeo, options: geoOptions, isInvalid: submitButtonIsClicked && !((_b = formState.geo) === null || _b === void 0 ? void 0 : _b.trim()), placeholder: t('Select a location'), onSelect: (option) => setGeoState(option) }))),
|
|
328
373
|
React.createElement(GridItem, { span: 12 },
|
|
329
374
|
React.createElement(FormGroup, { isRequired: true, label: t('Subject'), fieldId: "escalation-subject" },
|
|
330
375
|
submitButtonIsClicked && hasLargeSubject && (React.createElement(FormHelperText, null,
|
|
@@ -332,33 +377,33 @@ export function RequestEscalationModal(props) {
|
|
|
332
377
|
React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('Subject cannot be more than {{limit}} characters', {
|
|
333
378
|
limit: ESCALATION_SUBJECT_LENGTH_LIMIT,
|
|
334
379
|
}))))),
|
|
335
|
-
React.createElement(TextInput, { isRequired: true, validated: (submitButtonIsClicked &&
|
|
380
|
+
React.createElement(TextInput, { isRequired: true, validated: (submitButtonIsClicked && !((_c = formState.subject) === null || _c === void 0 ? void 0 : _c.trim())) || hasLargeSubject
|
|
336
381
|
? ValidatedOptions.error
|
|
337
382
|
: ValidatedOptions.default, type: "text", placeholder: t('Enter a subject for your request'), id: "subject-input", name: "subject-input", value: formState.subject, onChange: (_event, subject) => onSubjectChange(subject), "aria-label": t('Subject') }))),
|
|
338
383
|
React.createElement(GridItem, { span: 12 },
|
|
339
384
|
React.createElement(FormGroup, { isRequired: true, label: t('Description'), fieldId: "escalation-description" },
|
|
340
|
-
React.createElement(TextArea, { value: formState.description, onChange: (e, value) => setFormStateValue('description', value), isRequired: true, validated: submitButtonIsClicked &&
|
|
385
|
+
React.createElement(TextArea, { value: formState.description, onChange: (e, value) => setFormStateValue('description', value), isRequired: true, validated: submitButtonIsClicked && !((_d = formState.description) === null || _d === void 0 ? void 0 : _d.trim())
|
|
341
386
|
? ValidatedOptions.error
|
|
342
387
|
: ValidatedOptions.default, "aria-label": t('Description'), id: "description-textarea", placeholder: t('Provide a detailed comment for us to best assist you'), resizeOrientation: "vertical" }))),
|
|
343
388
|
React.createElement(GridItem, { span: 12 },
|
|
344
389
|
React.createElement(FormGroup, { isRequired: true, label: t('Expectations'), fieldId: "escalation-expectations" },
|
|
345
|
-
React.createElement(TextArea, { onChange: (e, value) => setFormStateValue('expectations', value), isRequired: true, validated: submitButtonIsClicked &&
|
|
390
|
+
React.createElement(TextArea, { onChange: (e, value) => setFormStateValue('expectations', value), isRequired: true, validated: submitButtonIsClicked && !((_f = formState.expectations) === null || _f === void 0 ? void 0 : _f.trim())
|
|
346
391
|
? ValidatedOptions.error
|
|
347
392
|
: ValidatedOptions.default, placeholder: t('What do you expect to happen with this escalation?'), id: "expectations-input", value: formState.expectations, "aria-label": t('Expectations'), resizeOrientation: "vertical" }))),
|
|
348
393
|
React.createElement(GridItem, { span: 12 },
|
|
349
394
|
React.createElement(FormGroup, { isRequired: true, label: t('Business impact'), fieldId: "escalation-business-impact" },
|
|
350
|
-
React.createElement(TextArea, { onChange: (e, value) => setFormStateValue('businessImpactDescription', value), isRequired: true, validated: submitButtonIsClicked &&
|
|
395
|
+
React.createElement(TextArea, { onChange: (e, value) => setFormStateValue('businessImpactDescription', value), isRequired: true, validated: submitButtonIsClicked && !((_g = formState.businessImpactDescription) === null || _g === void 0 ? void 0 : _g.trim())
|
|
351
396
|
? ValidatedOptions.error
|
|
352
397
|
: ValidatedOptions.default, placeholder: t('Does your business impact change with this escalation? Please describe how it changed.'), id: "business-impact-input", value: formState.businessImpactDescription, "aria-label": t('Business impact'), resizeOrientation: "vertical" }))))))));
|
|
353
398
|
// Check if first step is completed
|
|
354
399
|
const isFirstStepComplete = () => {
|
|
355
|
-
return (
|
|
356
|
-
|
|
357
|
-
|
|
400
|
+
return ((formState.rmeCategory || '').trim().length > 0 &&
|
|
401
|
+
(formState.geo || '').trim().length > 0 &&
|
|
402
|
+
(formState.subject || '').trim().length > 0 &&
|
|
358
403
|
!hasLargeSubject &&
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
404
|
+
(formState.description || '').trim().length > 0 &&
|
|
405
|
+
(formState.expectations || '').trim().length > 0 &&
|
|
406
|
+
(formState.businessImpactDescription || '').trim().length > 0);
|
|
362
407
|
};
|
|
363
408
|
const customNav = (isExpanded, steps, activeStep, goToStepByIndex) => (React.createElement(WizardNav, { isExpanded: isExpanded }, steps.map((step, index) => {
|
|
364
409
|
// Disable the second step if first step is not complete
|
|
@@ -374,20 +419,20 @@ export function RequestEscalationModal(props) {
|
|
|
374
419
|
React.createElement(FormGroup, { label: React.createElement(React.Fragment, null,
|
|
375
420
|
t('Name'),
|
|
376
421
|
" "), isRequired: true, fieldId: "contact-name" },
|
|
377
|
-
React.createElement(TextInput, { type: "text", validated: submitButtonIsClicked &&
|
|
422
|
+
React.createElement(TextInput, { type: "text", validated: submitButtonIsClicked && !((_h = formState.contactName) === null || _h === void 0 ? void 0 : _h.trim())
|
|
378
423
|
? ValidatedOptions.error
|
|
379
424
|
: ValidatedOptions.default, placeholder: t('Enter your name'), id: "contact-name", value: formState.contactName || '', onChange: (_e, value) => setFormState(Object.assign(Object.assign({}, formState), { contactName: value })), "aria-label": t('Contact name') }),
|
|
380
|
-
submitButtonIsClicked &&
|
|
425
|
+
submitButtonIsClicked && !((_j = formState.contactName) === null || _j === void 0 ? void 0 : _j.trim()) && (React.createElement(FormHelperText, null,
|
|
381
426
|
React.createElement(HelperText, null,
|
|
382
427
|
React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('Name is required'))))))),
|
|
383
428
|
React.createElement(GridItem, { span: 6 },
|
|
384
429
|
React.createElement(FormGroup, { label: React.createElement(React.Fragment, null,
|
|
385
430
|
t('Title'),
|
|
386
431
|
" "), isRequired: true, fieldId: "contact-title" },
|
|
387
|
-
React.createElement(TextInput, { type: "text", validated: submitButtonIsClicked &&
|
|
432
|
+
React.createElement(TextInput, { type: "text", validated: submitButtonIsClicked && !((_k = formState.contactTitle) === null || _k === void 0 ? void 0 : _k.trim())
|
|
388
433
|
? ValidatedOptions.error
|
|
389
434
|
: ValidatedOptions.default, placeholder: t('Enter your title (e.g. System Admin, DevOps, Project Man..)'), id: "contact-title", value: formState.contactTitle || '', onChange: (_e, value) => setFormState(Object.assign(Object.assign({}, formState), { contactTitle: value })), "aria-label": t('Contact title') }),
|
|
390
|
-
submitButtonIsClicked &&
|
|
435
|
+
submitButtonIsClicked && !((_l = formState.contactTitle) === null || _l === void 0 ? void 0 : _l.trim()) && (React.createElement(FormHelperText, null,
|
|
391
436
|
React.createElement(HelperText, null,
|
|
392
437
|
React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('Title is required'))))))),
|
|
393
438
|
React.createElement(GridItem, { span: 12 },
|
|
@@ -395,8 +440,8 @@ export function RequestEscalationModal(props) {
|
|
|
395
440
|
t('Contact preference'),
|
|
396
441
|
" "), isRequired: true, fieldId: "contact-preference", role: "radiogroup" },
|
|
397
442
|
React.createElement("div", { className: "pf-v6-u-display-flex pf-v6-u-flex-direction-row contact-preference-group" },
|
|
398
|
-
React.createElement(Radio, { id: "call-me", name: "contact-preference", label: t('Call me'), isChecked: formState.contactPreference === 'call-me', onChange: () => setFormState(Object.assign(Object.assign({}, formState), { contactPreference: 'call-me' })),
|
|
399
|
-
React.createElement(Radio, { id: "call-if-necessary", name: "contact-preference", label: t('Call only if necessary'), isChecked: formState.contactPreference === 'call-if-necessary', onChange: () => setFormState(Object.assign(Object.assign({}, formState), { contactPreference: 'call-if-necessary' })),
|
|
443
|
+
React.createElement(Radio, { id: "call-me", name: "contact-preference", label: t('Call me'), isChecked: formState.contactPreference === 'call-me', onChange: () => setFormState(Object.assign(Object.assign({}, formState), { contactPreference: 'call-me' })), style: { marginRight: '24px' } }),
|
|
444
|
+
React.createElement(Radio, { id: "call-if-necessary", name: "contact-preference", label: t('Call only if necessary'), isChecked: formState.contactPreference === 'call-if-necessary', onChange: () => setFormState(Object.assign(Object.assign({}, formState), { contactPreference: 'call-if-necessary' })), style: { marginRight: '8px' } }),
|
|
400
445
|
React.createElement(Radio, { id: "do-not-call", name: "contact-preference", label: t('Do not call'), isChecked: formState.contactPreference === 'do-not-call', onChange: () => setFormState(Object.assign(Object.assign({}, formState), { contactPreference: 'do-not-call', phoneNumber: '', timezone: '', preferredTimeFrom: '', preferredTimeTo: '' })) })),
|
|
401
446
|
submitButtonIsClicked && !formState.contactPreference && (React.createElement(FormHelperText, null,
|
|
402
447
|
React.createElement(HelperText, null,
|
|
@@ -407,19 +452,54 @@ export function RequestEscalationModal(props) {
|
|
|
407
452
|
React.createElement(FormGroup, { label: React.createElement(React.Fragment, null,
|
|
408
453
|
t("Case owner's phone number"),
|
|
409
454
|
" "), isRequired: true, fieldId: "phone-number" },
|
|
410
|
-
React.createElement(PhoneInput, { phoneValue: formState.phoneNumber || '', countryCode: ((
|
|
411
|
-
|
|
455
|
+
React.createElement(PhoneInput, { phoneValue: formState.phoneNumber || '', countryCode: ((_m = formState.countryCode) === null || _m === void 0 ? void 0 : _m.replace('+', '')) || '', onPhoneValueChange: (phone) => setFormState(Object.assign(Object.assign({}, formState), { phoneNumber: phone })), onCountryCodeChange: (code) => setFormState(Object.assign(Object.assign({}, formState), { countryCode: code })), validations: (submitButtonIsClicked &&
|
|
456
|
+
!isPhoneNumberValid(formState.phoneNumber, formState.countryCode)) ||
|
|
457
|
+
isPhoneInvalid ||
|
|
458
|
+
(submitButtonIsClicked &&
|
|
459
|
+
(getPhoneObj(formState.phoneNumber || '').countryCode +
|
|
460
|
+
' ' +
|
|
461
|
+
getPhoneObj(formState.phoneNumber || '').phoneLine).length > PHONE_LIMIT)
|
|
412
462
|
? 'error'
|
|
413
463
|
: 'default', isDisabled: false, invalid: isPhoneInvalid, setInvalid: setIsPhoneInvalid }),
|
|
414
|
-
|
|
464
|
+
!isPhoneInvalid &&
|
|
465
|
+
!((getPhoneObj(formState.phoneNumber || '').countryCode +
|
|
466
|
+
' ' +
|
|
467
|
+
getPhoneObj(formState.phoneNumber || '').phoneLine).length > PHONE_LIMIT) &&
|
|
468
|
+
!(submitButtonIsClicked &&
|
|
469
|
+
!isPhoneNumberValid(formState.phoneNumber, formState.countryCode)) && (React.createElement(FormHelperText, null,
|
|
470
|
+
React.createElement(HelperText, null,
|
|
471
|
+
React.createElement(HelperTextItem, { variant: "default" }, t('Note: A current phone/mobile number with the country code helps us support you better. Phone number will be stored in case comments for escalation only – not used for marketing.'))))),
|
|
472
|
+
isPhoneInvalid && (React.createElement(FormHelperText, null,
|
|
415
473
|
React.createElement(HelperText, null,
|
|
416
|
-
React.createElement(HelperTextItem, { variant:
|
|
417
|
-
submitButtonIsClicked &&
|
|
474
|
+
React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('Phone number can only have digits.'))))),
|
|
475
|
+
submitButtonIsClicked &&
|
|
476
|
+
(getPhoneObj(formState.phoneNumber || '').countryCode +
|
|
477
|
+
' ' +
|
|
478
|
+
getPhoneObj(formState.phoneNumber || '').phoneLine).length > PHONE_LIMIT && (React.createElement(FormHelperText, null,
|
|
479
|
+
React.createElement(HelperText, null,
|
|
480
|
+
React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('Phone number cannot be more than {{limit}} digits.', {
|
|
481
|
+
limit: PHONE_LIMIT,
|
|
482
|
+
}))))),
|
|
483
|
+
submitButtonIsClicked &&
|
|
484
|
+
isPhoneLineEmpty(formState.phoneNumber, formState.countryCode) && (React.createElement(FormHelperText, null,
|
|
418
485
|
React.createElement(HelperText, null,
|
|
419
486
|
React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('Phone number is required'))))),
|
|
420
|
-
|
|
487
|
+
submitButtonIsClicked &&
|
|
488
|
+
isPhoneNumberInvalid(formState.phoneNumber, formState.countryCode) &&
|
|
489
|
+
!isPhoneInvalid && (React.createElement(FormHelperText, null,
|
|
490
|
+
React.createElement(HelperText, null,
|
|
491
|
+
React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('Phone number cannot be empty'))))),
|
|
492
|
+
submitButtonIsClicked &&
|
|
493
|
+
!isEmpty(trimAndReplacePlus(formState.countryCode || '')) &&
|
|
494
|
+
!isCountryCodeValid(formState.countryCode) && (React.createElement(FormHelperText, null,
|
|
495
|
+
React.createElement(HelperText, null,
|
|
496
|
+
React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('Country code is invalid'))))),
|
|
497
|
+
submitButtonIsClicked &&
|
|
498
|
+
isEmpty(trimAndReplacePlus(formState.countryCode || '')) &&
|
|
499
|
+
!isPhoneLineEmpty(formState.phoneNumber, formState.countryCode) &&
|
|
500
|
+
!isPhoneInvalid && (React.createElement(FormHelperText, null,
|
|
421
501
|
React.createElement(HelperText, null,
|
|
422
|
-
React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('Phone number
|
|
502
|
+
React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('Phone number is not valid'))))))),
|
|
423
503
|
React.createElement(GridItem, { span: 12 },
|
|
424
504
|
React.createElement(FormGroup, { label: React.createElement(React.Fragment, null,
|
|
425
505
|
t('Timezone'),
|
|
@@ -429,7 +509,7 @@ export function RequestEscalationModal(props) {
|
|
|
429
509
|
value: '',
|
|
430
510
|
label: 'Select timezone',
|
|
431
511
|
}, options: TIMEZONE_OPTIONS, onSelect: (option) => setFormState(Object.assign(Object.assign({}, formState), { timezone: option.value })), placeholder: t('Select timezone') })),
|
|
432
|
-
submitButtonIsClicked &&
|
|
512
|
+
submitButtonIsClicked && !((_o = formState.timezone) === null || _o === void 0 ? void 0 : _o.trim()) && (React.createElement(FormHelperText, null,
|
|
433
513
|
React.createElement(HelperText, null,
|
|
434
514
|
React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('Timezone is required'))))))),
|
|
435
515
|
React.createElement(GridItem, { span: 12 },
|
|
@@ -439,26 +519,26 @@ export function RequestEscalationModal(props) {
|
|
|
439
519
|
React.createElement("div", { className: "pf-v6-u-display-flex pf-v6-u-align-items-center pf-v6-u-flex-nowrap time-fields-container" },
|
|
440
520
|
React.createElement("span", { className: "time-label pf-v6-u-mr-sm" }, t('from')),
|
|
441
521
|
React.createElement(TimePicker, { time: formState.preferredTimeFrom || '', onChange: (_event, time) => setFormState(Object.assign(Object.assign({}, formState), { preferredTimeFrom: time })), placeholder: "HH:MM", id: "preferred-time-from", "aria-label": t('Preferred time from'), className: "time-input", is24Hour: true, width: "150px", menuAppendTo: "parent", inputProps: {
|
|
442
|
-
validated: submitButtonIsClicked &&
|
|
522
|
+
validated: submitButtonIsClicked && !((_p = formState.preferredTimeFrom) === null || _p === void 0 ? void 0 : _p.trim())
|
|
443
523
|
? ValidatedOptions.error
|
|
444
524
|
: ValidatedOptions.default,
|
|
445
525
|
} }),
|
|
446
526
|
React.createElement("span", { className: "time-label pf-v6-u-mx-md" }, t('to')),
|
|
447
527
|
React.createElement(TimePicker, { time: formState.preferredTimeTo || '', onChange: (_event, time) => setFormState(Object.assign(Object.assign({}, formState), { preferredTimeTo: time })), placeholder: "HH:MM", id: "preferred-time-to", "aria-label": t('Preferred time to'), className: "time-input", is24Hour: true, width: "150px", menuAppendTo: "parent", inputProps: {
|
|
448
528
|
validated: submitButtonIsClicked &&
|
|
449
|
-
(
|
|
529
|
+
(!((_q = formState.preferredTimeTo) === null || _q === void 0 ? void 0 : _q.trim()) ||
|
|
450
530
|
!isValidTimeRange(formState.preferredTimeFrom || '', formState.preferredTimeTo || ''))
|
|
451
531
|
? ValidatedOptions.error
|
|
452
532
|
: ValidatedOptions.default,
|
|
453
533
|
} })),
|
|
454
534
|
submitButtonIsClicked &&
|
|
455
|
-
(
|
|
456
|
-
|
|
535
|
+
(!((_r = formState.preferredTimeFrom) === null || _r === void 0 ? void 0 : _r.trim()) ||
|
|
536
|
+
!((_s = formState.preferredTimeTo) === null || _s === void 0 ? void 0 : _s.trim())) && (React.createElement(FormHelperText, null,
|
|
457
537
|
React.createElement(HelperText, null,
|
|
458
538
|
React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('Preferred time is required'))))),
|
|
459
539
|
submitButtonIsClicked &&
|
|
460
|
-
formState.preferredTimeFrom &&
|
|
461
|
-
formState.preferredTimeTo &&
|
|
540
|
+
((_t = formState.preferredTimeFrom) === null || _t === void 0 ? void 0 : _t.trim()) &&
|
|
541
|
+
((_u = formState.preferredTimeTo) === null || _u === void 0 ? void 0 : _u.trim()) &&
|
|
462
542
|
!isValidTimeRange(formState.preferredTimeFrom, formState.preferredTimeTo) && (React.createElement(FormHelperText, null,
|
|
463
543
|
React.createElement(HelperText, null,
|
|
464
544
|
React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('End time must be after start time'))))))))))))));
|
|
@@ -40,7 +40,7 @@ export function CaseInformation(props) {
|
|
|
40
40
|
React.createElement("form", null,
|
|
41
41
|
React.createElement(ProductVersion, null),
|
|
42
42
|
React.createElement(CaseOpenshiftClusterId, null),
|
|
43
|
-
React.createElement(CaseHostname, { inlineEditable: true }),
|
|
43
|
+
caseType !== PreviousCaseTypes.FEATURE_ENHANCEMENT && React.createElement(CaseHostname, { inlineEditable: true }),
|
|
44
44
|
React.createElement("div", { className: "form-group" },
|
|
45
45
|
React.createElement("label", { htmlFor: "case-description" },
|
|
46
46
|
React.createElement(Trans, null, "Description")),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Timeline.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseHistory/Timeline.tsx"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AAwBxB,OAAO,KAAsC,MAAM,OAAO,CAAC;AA8W3D,QAAA,MAAM,QAAQ;;
|
|
1
|
+
{"version":3,"file":"Timeline.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseHistory/Timeline.tsx"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AAwBxB,OAAO,KAAsC,MAAM,OAAO,CAAC;AA8W3D,QAAA,MAAM,QAAQ;;uBAkVb,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -343,7 +343,7 @@ const Timeline = ({ caseNumber }) => {
|
|
|
343
343
|
}
|
|
344
344
|
catch (error) {
|
|
345
345
|
console.error('Failed to fetch history:', error);
|
|
346
|
-
setFetchError('Unable to connect');
|
|
346
|
+
setFetchError(t('Unable to connect'));
|
|
347
347
|
}
|
|
348
348
|
finally {
|
|
349
349
|
setIsFetchingData(false);
|
|
@@ -351,6 +351,7 @@ const Timeline = ({ caseNumber }) => {
|
|
|
351
351
|
});
|
|
352
352
|
}
|
|
353
353
|
fetchHistory();
|
|
354
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
354
355
|
}, [caseNumber]);
|
|
355
356
|
const futureDateValidator = (date) => {
|
|
356
357
|
const today = new Date();
|
|
@@ -440,11 +441,10 @@ const Timeline = ({ caseNumber }) => {
|
|
|
440
441
|
if (fetchError) {
|
|
441
442
|
return (React.createElement(EmptyState, { headingLevel: "h2", icon: ExclamationCircleIcon, titleText: "Unable to connect", variant: EmptyStateVariant.full },
|
|
442
443
|
React.createElement(EmptyStateBody, null,
|
|
443
|
-
React.createElement(Trans,
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
"or check back later"))));
|
|
444
|
+
React.createElement(Trans, { i18nKey: "Try <reloadLink>reloading the page</reloadLink> or check back later", components: {
|
|
445
|
+
// eslint-disable-next-line jsx-a11y/anchor-has-content, jsx-a11y/anchor-is-valid
|
|
446
|
+
reloadLink: React.createElement("a", { href: "#", onClick: handleReload }),
|
|
447
|
+
} }))));
|
|
448
448
|
}
|
|
449
449
|
if (filteredEvents.length < 1) {
|
|
450
450
|
return (React.createElement(EmptyState, { headingLevel: "h2", icon: SearchIcon, titleText: React.createElement(Trans, null, "No results found"), variant: EmptyStateVariant.full },
|
|
@@ -459,13 +459,16 @@ const Timeline = ({ caseNumber }) => {
|
|
|
459
459
|
React.createElement(SearchInput, { placeholder: t('Search for a user, action, or keyword'), value: searchValue, onChange: handleSearchChange, onClear: handleClear, className: "case-history-timeline-search" }),
|
|
460
460
|
React.createElement("div", { className: "case-history-timeline-datepicker" },
|
|
461
461
|
React.createElement(DatePicker, { value: dateValue, onChange: (_event, value) => handleDateChange(value), validators: [futureDateValidator] }),
|
|
462
|
-
React.createElement(Button, { className: "pf-v6-u-ml-xs", onClick: () => setDateValue(''), isDisabled: isEmpty(dateValue) },
|
|
462
|
+
React.createElement(Button, { className: "pf-v6-u-ml-xs", onClick: () => setDateValue(''), isDisabled: isEmpty(dateValue) },
|
|
463
|
+
React.createElement(Trans, null, "Reset")))),
|
|
463
464
|
React.createElement("div", { className: "timeline-controls" },
|
|
464
465
|
React.createElement("div", { className: "timeline-pagination" }, renderPagination()),
|
|
465
466
|
React.createElement("div", { className: "timeline-sort-order-select" },
|
|
466
|
-
React.createElement(Select, { id: "order-select", isOpen: isSelectOpen, selected: selectedOrder, onSelect: handleSelect, onOpenChange: (isOpen) => setIsSelectOpen(isOpen), shouldFocusToggleOnSelect: false, toggle: (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, onClick: handleSelectToggle, isExpanded: isSelectOpen }, selectedOrder)) },
|
|
467
|
-
React.createElement(SelectOption, { value: "Newest to Oldest" },
|
|
468
|
-
|
|
467
|
+
React.createElement(Select, { id: "order-select", isOpen: isSelectOpen, selected: selectedOrder, onSelect: handleSelect, onOpenChange: (isOpen) => setIsSelectOpen(isOpen), shouldFocusToggleOnSelect: false, toggle: (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, onClick: handleSelectToggle, isExpanded: isSelectOpen }, selectedOrder === 'Newest to Oldest' ? (React.createElement(Trans, null, "Newest to Oldest")) : (React.createElement(Trans, null, "Oldest to Newest")))) },
|
|
468
|
+
React.createElement(SelectOption, { value: "Newest to Oldest" },
|
|
469
|
+
React.createElement(Trans, null, "Newest to Oldest")),
|
|
470
|
+
React.createElement(SelectOption, { value: "Oldest to Newest" },
|
|
471
|
+
React.createElement(Trans, null, "Oldest to Newest"))))),
|
|
469
472
|
isFetchingData ? (React.createElement("div", { className: "timeline-loading-spinner" },
|
|
470
473
|
React.createElement(Spinner, { size: "xl" }))) : (React.createElement("div", { className: `timeline ${filteredEvents.length === 0 ? 'timeline-empty' : ''}` }, renderTimelineContent())),
|
|
471
474
|
React.createElement("div", { className: "timeline-controls" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenCaseIssue.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/OpenCaseIssue.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAS/D,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"OpenCaseIssue.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/OpenCaseIssue.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAS/D,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC;AASD,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,qBAqJnC;kBArJQ,aAAa;;;AAwJtB,eAAe,aAAa,CAAC"}
|
|
@@ -59,6 +59,8 @@ function OpenCaseIssue(props) {
|
|
|
59
59
|
const getTitleSummaryInvalid = () => hasLargeTitleSummary || (isNextBtnClickedToShowValidationError && isSummaryEmpty);
|
|
60
60
|
const getIssueSummaryInvalid = () => hasLargeIssueSummary || (isNextBtnClickedToShowValidationError && isIssueEmpty);
|
|
61
61
|
const isIdea = () => supportType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
|
|
62
|
+
const isIdeaResult = isIdea();
|
|
63
|
+
const shouldHideOnGetSupport = isIdeaResult && props.isOnGetSupportPage;
|
|
62
64
|
useEffect(() => {
|
|
63
65
|
setIsSummaryEmpty(summary ? isEmpty(summary.trim()) : true);
|
|
64
66
|
setIsIssueEmpty(issue ? isEmpty(issue.trim()) : true);
|
|
@@ -66,6 +68,9 @@ function OpenCaseIssue(props) {
|
|
|
66
68
|
issue && setHasLargeIssueSummary(issue.length > ISSUE_SUMMARY_LENGTH_LIMIT);
|
|
67
69
|
// @ts-ignore
|
|
68
70
|
}, [summary, issue]);
|
|
71
|
+
if (shouldHideOnGetSupport) {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
69
74
|
return (React.createElement(React.Fragment, null,
|
|
70
75
|
React.createElement(InlineEdit, { labelProps: {
|
|
71
76
|
htmlFor: isIdea() ? 'get-support-title' : 'get-support-summary',
|
|
@@ -75,7 +80,7 @@ function OpenCaseIssue(props) {
|
|
|
75
80
|
alignItems: 'center',
|
|
76
81
|
},
|
|
77
82
|
}, labelContent: React.createElement(React.Fragment, null,
|
|
78
|
-
React.createElement(Trans, null,
|
|
83
|
+
React.createElement(Trans, null, "Title"),
|
|
79
84
|
' ',
|
|
80
85
|
!!props.required && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))), helperContent: React.createElement("div", { className: "title-summary-counter" },
|
|
81
86
|
`${summary === null || summary === void 0 ? void 0 : summary.length} / ${TITLE_SUMMARY_LENGTH_LIMIT}`,
|
package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NonOrgCaseNotifyeesSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAwB,oBAAoB,EAAY,MAAM,wBAAwB,CAAC;AAE9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,aAAa,EAAE,oBAAoB,EAAE,CAAC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,aAAa,EAAE,oBAAoB,EAAE,KAAK,IAAI,CAAC;IAC1D,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC1C,kBAAkB,EAAE,MAAM,CAAC;CAC9B;AA+BD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"NonOrgCaseNotifyeesSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAwB,oBAAoB,EAAY,MAAM,wBAAwB,CAAC;AAE9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,aAAa,EAAE,oBAAoB,EAAE,CAAC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,aAAa,EAAE,oBAAoB,EAAE,KAAK,IAAI,CAAC;IAC1D,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC1C,kBAAkB,EAAE,MAAM,CAAC;CAC9B;AA+BD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBA2NxD"}
|
|
@@ -88,7 +88,18 @@ export function NonOrgCaseNotifyeesSelector(props) {
|
|
|
88
88
|
}
|
|
89
89
|
else {
|
|
90
90
|
if (notificationAddress === null || notificationAddress === void 0 ? void 0 : notificationAddress.email) {
|
|
91
|
-
|
|
91
|
+
const isEmailAlreadySelected = props.selectedItems.some((item) => {
|
|
92
|
+
var _a, _b;
|
|
93
|
+
return isCustomEmailAddress(item) &&
|
|
94
|
+
((_a = item.emailAddress) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = notificationAddress.email) === null || _b === void 0 ? void 0 : _b.toLowerCase());
|
|
95
|
+
});
|
|
96
|
+
if (!isEmailAlreadySelected) {
|
|
97
|
+
const updatedSelection = [
|
|
98
|
+
...props.selectedItems,
|
|
99
|
+
{ emailAddress: notificationAddress.email, caseNumber: '' },
|
|
100
|
+
];
|
|
101
|
+
(_c = props.onChange) === null || _c === void 0 ? void 0 : _c.call(props, updatedSelection);
|
|
102
|
+
}
|
|
92
103
|
setInputVal('');
|
|
93
104
|
}
|
|
94
105
|
else if (contacts === null || contacts === void 0 ? void 0 : contacts.length) {
|
|
@@ -98,7 +109,10 @@ export function NonOrgCaseNotifyeesSelector(props) {
|
|
|
98
109
|
const { ssoName } = c, rest = __rest(c, ["ssoName"]);
|
|
99
110
|
return Object.assign({ ssoUsername: ssoName }, rest);
|
|
100
111
|
});
|
|
101
|
-
|
|
112
|
+
const isUsernameAlreadySelected = mappedContacts.some((contact) => props.selectedItems.some((item) => isContact(item) && item.ssoUsername === contact.ssoUsername));
|
|
113
|
+
if (!isUsernameAlreadySelected) {
|
|
114
|
+
(_d = props.onChange) === null || _d === void 0 ? void 0 : _d.call(props, [...mappedContacts]);
|
|
115
|
+
}
|
|
102
116
|
setInputVal('');
|
|
103
117
|
}
|
|
104
118
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AllProductsSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/AllProductsSelector.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMvG,UAAU,MAAM;IACZ,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAQD;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"AllProductsSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/AllProductsSelector.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMvG,UAAU,MAAM;IACZ,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAQD;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,4EAoLvB,CAAC;AAGH,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -104,7 +104,7 @@ const AllProductsSelector = forwardRef((props, ref) => {
|
|
|
104
104
|
React.createElement("div", { className: "all-product-selector-dropdown" },
|
|
105
105
|
React.createElement(ProductVersionDropdownSelector, { isLoading: allProducts.isFetching, products: props.checkEntitledProduct ? entitledProducts : allProducts.data.productsResult, onProductChange: onProductChange, onVersionChange: onVersionChange, ref: ref, isOnSummaryPage: props.isOnSummaryPage, loadTCOnChange: props.loadTCOnChange, isFetching: topContent.isFetching })))),
|
|
106
106
|
renderOpenCaseIssue && (React.createElement("div", { className: "case-details-summary" },
|
|
107
|
-
React.createElement(OpenCaseIssue, { inlineEditable: false, required: true, isOnSummaryPage: props.isOnSummaryPage }))),
|
|
107
|
+
React.createElement(OpenCaseIssue, { inlineEditable: false, required: true, isOnSummaryPage: props.isOnSummaryPage, isOnGetSupportPage: props.isOnGetSupportPage }))),
|
|
108
108
|
React.createElement(AlertMessage, { isInline: true, variant: AlertType.DANGER, className: "pf-v6-u-mt-lg", title: t(`${loggedInUserRights.data.isSSOUsernameSameAsLoggedInUser(contactSSOName)
|
|
109
109
|
? 'You are'
|
|
110
110
|
: 'Selected owner is'} not allowed to create case on this product.`), show: !allProducts.isFetching && props.checkEntitledProduct && !isEntitledProduct && !isEmpty(product) }),
|
|
@@ -458,7 +458,6 @@ declare const _default: {
|
|
|
458
458
|
'No access': string;
|
|
459
459
|
'Bookmark Account': string;
|
|
460
460
|
'Submit request': string;
|
|
461
|
-
'Oldest to Newest': string;
|
|
462
461
|
i18RequestEscalationLearnMore: string;
|
|
463
462
|
'Private Notes': string;
|
|
464
463
|
on: string;
|
|
@@ -799,6 +798,47 @@ declare const _default: {
|
|
|
799
798
|
'Update info': string;
|
|
800
799
|
Summarize: string;
|
|
801
800
|
'Describe more': string;
|
|
801
|
+
'Newest to Oldest': string;
|
|
802
|
+
'Oldest to Newest': string;
|
|
803
|
+
Reset: string;
|
|
804
|
+
'Search for a user, action, or keyword': string;
|
|
805
|
+
'Try <reloadLink>reloading the page</reloadLink> or check back later': string;
|
|
806
|
+
'Try modifying your search query or changing the date range and try again.': string;
|
|
807
|
+
Resources: string;
|
|
808
|
+
'Upload a file for Red Hat to analyze': string;
|
|
809
|
+
'To help us provide the right guidance, upload a sosreport.': string;
|
|
810
|
+
'Describe your problem. Include specific actions and error messages.': string;
|
|
811
|
+
'How to create sosreport?': string;
|
|
812
|
+
'Articles recommended by OpenShift AI': string;
|
|
813
|
+
'Updating recommendations using OpenShift AI': string;
|
|
814
|
+
'Recommending articles using OpenShift AI': string;
|
|
815
|
+
'Exact match': string;
|
|
816
|
+
'Best match': string;
|
|
817
|
+
Match: string;
|
|
818
|
+
'Additional information': string;
|
|
819
|
+
'Support articles are matched to the product and version details you selected, not the problem details you entered.': string;
|
|
820
|
+
'convert to case': string;
|
|
821
|
+
'Please provide details about the location, device, software version, etc. where you encounter this issue': string;
|
|
822
|
+
'Describe the user or financial impact. Tell us about any legal, national, or medical urgency.': string;
|
|
823
|
+
'Describe when and how often the problem occurs, e.g., daily, after specific actions, at particular times of day, etc.': string;
|
|
824
|
+
"Describe the impact to you or the business'": string;
|
|
825
|
+
'In what environment are you experiencing this behavior?': string;
|
|
826
|
+
'How frequently does this behavior occur? Does it occur repeatedly or at certain times?': string;
|
|
827
|
+
i18nKeyPlaceHolderDetail: string;
|
|
828
|
+
'Example:': string;
|
|
829
|
+
'To expedite your case, include these details:': string;
|
|
830
|
+
Problem: string;
|
|
831
|
+
'Error Messages': string;
|
|
832
|
+
'Tips for describing your problem': string;
|
|
833
|
+
"There aren't any related tasks": string;
|
|
834
|
+
All: string;
|
|
835
|
+
Jira: string;
|
|
836
|
+
'Do you want to close this case?': string;
|
|
837
|
+
i18ConfirmResolution: string;
|
|
838
|
+
Resolution: string;
|
|
839
|
+
'Red Hat solved my issue or reviewed my request': string;
|
|
840
|
+
'The issue has been self-solved': string;
|
|
841
|
+
"I'm not experiencing the issue anymore": string;
|
|
802
842
|
'AI insights is currently unavailable, try reloading.': string;
|
|
803
843
|
'Back to resources': string;
|
|
804
844
|
'Chat with AI': string;
|
|
@@ -812,7 +852,6 @@ declare const _default: {
|
|
|
812
852
|
'Red Hat hand picked support articles': string;
|
|
813
853
|
Reload: string;
|
|
814
854
|
'Resolve your issue now with AI insights': string;
|
|
815
|
-
'Support articles are matched to the product and version details you selected, not the problem details you entered.': string;
|
|
816
855
|
'Troubleshoot with AI insights': string;
|
|
817
856
|
'Want to continue the conversation? Dive deeper with our AI assistant': string;
|
|
818
857
|
'Why did you choose this rating?': string;
|