@rh-support/troubleshoot 2.6.85 → 2.6.87

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.
Files changed (40) hide show
  1. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
  2. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +75 -42
  3. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
  4. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +9 -1
  5. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
  6. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +9 -1
  7. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
  8. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +13 -10
  9. package/lib/esm/components/CaseInformation/Fts.js +1 -1
  10. package/lib/esm/components/Review/Review.d.ts.map +1 -1
  11. package/lib/esm/components/Review/Review.js +6 -4
  12. package/lib/esm/i18n/template-de.d.ts +41 -2
  13. package/lib/esm/i18n/template-de.d.ts.map +1 -1
  14. package/lib/esm/i18n/template-de.js +41 -2
  15. package/lib/esm/i18n/template-es.d.ts +41 -2
  16. package/lib/esm/i18n/template-es.d.ts.map +1 -1
  17. package/lib/esm/i18n/template-es.js +41 -2
  18. package/lib/esm/i18n/template-fr.d.ts +41 -2
  19. package/lib/esm/i18n/template-fr.d.ts.map +1 -1
  20. package/lib/esm/i18n/template-fr.js +41 -2
  21. package/lib/esm/i18n/template-it.d.ts +41 -2
  22. package/lib/esm/i18n/template-it.d.ts.map +1 -1
  23. package/lib/esm/i18n/template-it.js +41 -2
  24. package/lib/esm/i18n/template-jp.d.ts +41 -2
  25. package/lib/esm/i18n/template-jp.d.ts.map +1 -1
  26. package/lib/esm/i18n/template-jp.js +41 -2
  27. package/lib/esm/i18n/template-ko.d.ts +41 -2
  28. package/lib/esm/i18n/template-ko.d.ts.map +1 -1
  29. package/lib/esm/i18n/template-ko.js +41 -2
  30. package/lib/esm/i18n/template-pt.d.ts +41 -2
  31. package/lib/esm/i18n/template-pt.d.ts.map +1 -1
  32. package/lib/esm/i18n/template-pt.js +41 -2
  33. package/lib/esm/i18n/template-ru.d.ts +6 -1
  34. package/lib/esm/i18n/template-ru.d.ts.map +1 -1
  35. package/lib/esm/i18n/template-ru.js +6 -1
  36. package/lib/esm/i18n/template-zh.d.ts +18 -0
  37. package/lib/esm/i18n/template-zh.d.ts.map +1 -1
  38. package/lib/esm/i18n/template-zh.js +18 -0
  39. package/lib/esm/scss/_pf-overrides.scss +4 -8
  40. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"RequestEscalationModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.tsx"],"names":[],"mappings":"AAoCA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAqBnD,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,qBA4zBnD"}
1
+ {"version":3,"file":"RequestEscalationModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.tsx"],"names":[],"mappings":"AAsCA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAqBnD,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,qBA63BnD"}
@@ -8,10 +8,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { escalations, publicApi } from '@cee-eng/hydrajs';
11
- import { Button, Form, FormGroup, FormHelperText, Grid, GridItem, HelperText, HelperTextItem, Modal, ModalBody, ModalHeader, ModalVariant, Radio, TextArea, TextInput, TimePicker, Title, ValidatedOptions, Wizard, WizardStep, } from '@patternfly/react-core';
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
12
  import { AlertMessage, AlertType, PhoneInput, SingleSelectDropdown, ToastNotification, useFetch, } from '@rh-support/components';
13
13
  import { useGlobalStateContext } from '@rh-support/react-context';
14
- import isEmpty from 'lodash/isEmpty';
15
14
  import React, { useEffect, useState } from 'react';
16
15
  import { Trans, useTranslation } from 'react-i18next';
17
16
  import { useCaseDispatch } from '../../../context/CaseContext';
@@ -24,7 +23,7 @@ import { updateDiscussionStateComments } from '../../../reducers/CaseDiscussionT
24
23
  import { checkForCaseStatusToggleOnAttachOrComment, fetchCaseDetails } from '../../../reducers/CaseReducer';
25
24
  const customerGEOKeys = Object.keys(CustomerGEOs);
26
25
  export function RequestEscalationModal(props) {
27
- var _a;
26
+ var _a, _b, _c, _d, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
28
27
  const { globalMetadataState: { loggedInUser, loggedInUserRights }, } = useGlobalStateContext();
29
28
  const { t } = useTranslation();
30
29
  const [categories, setCategories] = useState([]);
@@ -47,6 +46,12 @@ export function RequestEscalationModal(props) {
47
46
  const [formState, setFormState] = useState(initialState);
48
47
  const [hasLargeSubject, setHasLargeSubject] = useState(false);
49
48
  const [submitButtonIsClicked, setSubmitSaveButtonIsClicked] = useState(false);
49
+ const [isPhoneInvalid, setIsPhoneInvalid] = useState(false);
50
+ const isPhoneNumberValid = (phoneNumber) => {
51
+ const trimmedPhone = (phoneNumber || '').trim();
52
+ // Phone number should have some digits other than country code to be considered valid
53
+ return trimmedPhone.length >= 5;
54
+ };
50
55
  // Function to check if "to" time is after "from" time
51
56
  const isValidTimeRange = (fromTime, toTime) => {
52
57
  if (!fromTime || !toTime)
@@ -80,7 +85,10 @@ export function RequestEscalationModal(props) {
80
85
  if ((formState.contactPreference === 'call-me' || formState.contactPreference === 'call-if-necessary') &&
81
86
  formState.preferredTimeFrom &&
82
87
  formState.preferredTimeTo) {
83
- return hasAllFields && isValidTimeRange(formState.preferredTimeFrom, formState.preferredTimeTo);
88
+ return (hasAllFields &&
89
+ isValidTimeRange(formState.preferredTimeFrom, formState.preferredTimeTo) &&
90
+ !isPhoneInvalid &&
91
+ isPhoneNumberValid(formState.phoneNumber));
84
92
  }
85
93
  return hasAllFields;
86
94
  };
@@ -126,6 +134,7 @@ export function RequestEscalationModal(props) {
126
134
  setSubmitSaveButtonIsClicked(false);
127
135
  setFormState(initialState);
128
136
  setHasLargeSubject(false);
137
+ setIsPhoneInvalid(false);
129
138
  props.onClose();
130
139
  };
131
140
  const onSubmit = () => __awaiter(this, void 0, void 0, function* () {
@@ -186,7 +195,7 @@ export function RequestEscalationModal(props) {
186
195
  const hour12 = hour % 12 || 12;
187
196
  return `${hour12}:${minutes}${ampm}`;
188
197
  };
189
- 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 Impact**\n{{businessImpactDescription}}\n\n**Contact Preference**\n{{contactPreference}}{{phoneDetails}}\n\n', {
198
+ 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', {
190
199
  category: formState.rmeCategory,
191
200
  subject: formState.subject,
192
201
  description: formState.description,
@@ -210,6 +219,7 @@ export function RequestEscalationModal(props) {
210
219
  setFormState(initialState);
211
220
  setSubmitSaveButtonIsClicked(false);
212
221
  setHasLargeSubject(false);
222
+ setIsPhoneInvalid(false);
213
223
  setCreationError(false);
214
224
  props.onClose();
215
225
  }
@@ -264,24 +274,26 @@ export function RequestEscalationModal(props) {
264
274
  // Validate current step
265
275
  const isCurrentStepValid = () => {
266
276
  if (activeStep.id === 'escalation-details') {
267
- return (!isEmpty(formState.rmeCategory) &&
268
- !isEmpty(formState.geo) &&
269
- !isEmpty(formState.subject) &&
277
+ return ((formState.rmeCategory || '').trim().length > 0 &&
278
+ (formState.geo || '').trim().length > 0 &&
279
+ (formState.subject || '').trim().length > 0 &&
270
280
  !hasLargeSubject &&
271
- !isEmpty(formState.description) &&
272
- !isEmpty(formState.expectations) &&
273
- !isEmpty(formState.businessImpactDescription));
281
+ (formState.description || '').trim().length > 0 &&
282
+ (formState.expectations || '').trim().length > 0 &&
283
+ (formState.businessImpactDescription || '').trim().length > 0);
274
284
  }
275
285
  else if (activeStep.id === 'contact-details') {
276
- const baseValidation = !isEmpty(formState.contactName) &&
277
- !isEmpty(formState.contactTitle) &&
278
- !isEmpty(formState.contactPreference);
286
+ const baseValidation = (formState.contactName || '').trim().length > 0 &&
287
+ (formState.contactTitle || '').trim().length > 0 &&
288
+ (formState.contactPreference || '').trim().length > 0;
279
289
  // Additional validation if call options are selected
280
290
  if (formState.contactPreference === 'call-me' || formState.contactPreference === 'call-if-necessary') {
281
291
  return (baseValidation &&
282
- !isEmpty(formState.phoneNumber) &&
283
- !isEmpty(formState.preferredTimeFrom) &&
284
- !isEmpty(formState.preferredTimeTo));
292
+ isPhoneNumberValid(formState.phoneNumber) &&
293
+ !isPhoneInvalid &&
294
+ (formState.preferredTimeFrom || '').trim().length > 0 &&
295
+ (formState.preferredTimeTo || '').trim().length > 0 &&
296
+ (formState.timezone || '').trim().length > 0);
285
297
  }
286
298
  return baseValidation;
287
299
  }
@@ -305,7 +317,7 @@ export function RequestEscalationModal(props) {
305
317
  setSubmitSaveButtonIsClicked(false);
306
318
  goToPrevStep({});
307
319
  }, isDisabled: isLoading, "data-tracking-id": "request-rme-back" }, t('Back'))),
308
- 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')),
320
+ 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')),
309
321
  React.createElement(Button, { variant: "link", onClick: onCancel, isDisabled: isLoading, "data-tracking-id": "request-rme-cancel" }, t('Cancel'))));
310
322
  };
311
323
  const escalationDetailsStep = (React.createElement(WizardStep, { id: "escalation-details", name: t('Escalation details') },
@@ -315,10 +327,10 @@ export function RequestEscalationModal(props) {
315
327
  React.createElement(Grid, { hasGutter: true },
316
328
  React.createElement(GridItem, { span: 6 },
317
329
  React.createElement(FormGroup, { isRequired: true, label: t('Category'), fieldId: "escalation-category" },
318
- React.createElement(SingleSelectDropdown, { id: "customer-category-select", ariaLabel: t('Category'), selected: selectedCategory, options: categoryOptions, isDisabled: false, isLoading: isCategoriesFetching, isInvalid: submitButtonIsClicked && isEmpty(formState.rmeCategory), placeholder: t('Select an option that best fits'), onSelect: (option) => setCategoryState(option), isScrollable: true }))),
330
+ 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 }))),
319
331
  React.createElement(GridItem, { span: 6 },
320
332
  React.createElement(FormGroup, { isRequired: true, label: t('My region'), fieldId: "escalation-region" },
321
- React.createElement(SingleSelectDropdown, { ariaLabel: t('My region'), id: "customer-geo-select", selected: selectedGeo, options: geoOptions, isInvalid: submitButtonIsClicked && isEmpty(formState.geo), placeholder: t('Select a location'), onSelect: (option) => setGeoState(option) }))),
333
+ 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) }))),
322
334
  React.createElement(GridItem, { span: 12 },
323
335
  React.createElement(FormGroup, { isRequired: true, label: t('Subject'), fieldId: "escalation-subject" },
324
336
  submitButtonIsClicked && hasLargeSubject && (React.createElement(FormHelperText, null,
@@ -326,24 +338,39 @@ export function RequestEscalationModal(props) {
326
338
  React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('Subject cannot be more than {{limit}} characters', {
327
339
  limit: ESCALATION_SUBJECT_LENGTH_LIMIT,
328
340
  }))))),
329
- React.createElement(TextInput, { isRequired: true, validated: (submitButtonIsClicked && isEmpty(formState.subject)) || hasLargeSubject
341
+ React.createElement(TextInput, { isRequired: true, validated: (submitButtonIsClicked && !((_c = formState.subject) === null || _c === void 0 ? void 0 : _c.trim())) || hasLargeSubject
330
342
  ? ValidatedOptions.error
331
343
  : 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') }))),
332
344
  React.createElement(GridItem, { span: 12 },
333
345
  React.createElement(FormGroup, { isRequired: true, label: t('Description'), fieldId: "escalation-description" },
334
- React.createElement(TextArea, { value: formState.description, onChange: (e, value) => setFormStateValue('description', value), isRequired: true, validated: submitButtonIsClicked && isEmpty(formState.description)
346
+ 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())
335
347
  ? ValidatedOptions.error
336
348
  : ValidatedOptions.default, "aria-label": t('Description'), id: "description-textarea", placeholder: t('Provide a detailed comment for us to best assist you'), resizeOrientation: "vertical" }))),
337
349
  React.createElement(GridItem, { span: 12 },
338
350
  React.createElement(FormGroup, { isRequired: true, label: t('Expectations'), fieldId: "escalation-expectations" },
339
- React.createElement(TextArea, { onChange: (e, value) => setFormStateValue('expectations', value), isRequired: true, validated: submitButtonIsClicked && isEmpty(formState.expectations)
351
+ React.createElement(TextArea, { onChange: (e, value) => setFormStateValue('expectations', value), isRequired: true, validated: submitButtonIsClicked && !((_f = formState.expectations) === null || _f === void 0 ? void 0 : _f.trim())
340
352
  ? ValidatedOptions.error
341
353
  : 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" }))),
342
354
  React.createElement(GridItem, { span: 12 },
343
355
  React.createElement(FormGroup, { isRequired: true, label: t('Business impact'), fieldId: "escalation-business-impact" },
344
- React.createElement(TextArea, { onChange: (e, value) => setFormStateValue('businessImpactDescription', value), isRequired: true, validated: submitButtonIsClicked && isEmpty(formState.businessImpactDescription)
356
+ React.createElement(TextArea, { onChange: (e, value) => setFormStateValue('businessImpactDescription', value), isRequired: true, validated: submitButtonIsClicked && !((_g = formState.businessImpactDescription) === null || _g === void 0 ? void 0 : _g.trim())
345
357
  ? ValidatedOptions.error
346
358
  : 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" }))))))));
359
+ // Check if first step is completed
360
+ const isFirstStepComplete = () => {
361
+ return ((formState.rmeCategory || '').trim().length > 0 &&
362
+ (formState.geo || '').trim().length > 0 &&
363
+ (formState.subject || '').trim().length > 0 &&
364
+ !hasLargeSubject &&
365
+ (formState.description || '').trim().length > 0 &&
366
+ (formState.expectations || '').trim().length > 0 &&
367
+ (formState.businessImpactDescription || '').trim().length > 0);
368
+ };
369
+ const customNav = (isExpanded, steps, activeStep, goToStepByIndex) => (React.createElement(WizardNav, { isExpanded: isExpanded }, steps.map((step, index) => {
370
+ // Disable the second step if first step is not complete
371
+ const isDisabled = step.id === 'contact-details' && !isFirstStepComplete();
372
+ return (React.createElement(WizardNavItem, { key: step.id, id: step.id, content: step.name, isCurrent: activeStep.id === step.id, isDisabled: isDisabled, stepIndex: step.index, onClick: () => !isDisabled && goToStepByIndex(step.index) }));
373
+ })));
347
374
  const contactDetailsStep = (React.createElement(WizardStep, { id: "contact-details", name: t('Contact details') },
348
375
  React.createElement("div", { className: "wizard-step-content" },
349
376
  React.createElement(Title, { headingLevel: "h2", size: "2xl", className: "pf-v6-u-mb-lg" }, t('Contact details')),
@@ -353,20 +380,20 @@ export function RequestEscalationModal(props) {
353
380
  React.createElement(FormGroup, { label: React.createElement(React.Fragment, null,
354
381
  t('Name'),
355
382
  " "), isRequired: true, fieldId: "contact-name" },
356
- React.createElement(TextInput, { type: "text", validated: submitButtonIsClicked && isEmpty(formState.contactName)
383
+ React.createElement(TextInput, { type: "text", validated: submitButtonIsClicked && !((_h = formState.contactName) === null || _h === void 0 ? void 0 : _h.trim())
357
384
  ? ValidatedOptions.error
358
385
  : 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') }),
359
- submitButtonIsClicked && isEmpty(formState.contactName) && (React.createElement(FormHelperText, null,
386
+ submitButtonIsClicked && !((_j = formState.contactName) === null || _j === void 0 ? void 0 : _j.trim()) && (React.createElement(FormHelperText, null,
360
387
  React.createElement(HelperText, null,
361
388
  React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('Name is required'))))))),
362
389
  React.createElement(GridItem, { span: 6 },
363
390
  React.createElement(FormGroup, { label: React.createElement(React.Fragment, null,
364
391
  t('Title'),
365
392
  " "), isRequired: true, fieldId: "contact-title" },
366
- React.createElement(TextInput, { type: "text", validated: submitButtonIsClicked && isEmpty(formState.contactTitle)
393
+ React.createElement(TextInput, { type: "text", validated: submitButtonIsClicked && !((_k = formState.contactTitle) === null || _k === void 0 ? void 0 : _k.trim())
367
394
  ? ValidatedOptions.error
368
395
  : 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') }),
369
- submitButtonIsClicked && isEmpty(formState.contactTitle) && (React.createElement(FormHelperText, null,
396
+ submitButtonIsClicked && !((_l = formState.contactTitle) === null || _l === void 0 ? void 0 : _l.trim()) && (React.createElement(FormHelperText, null,
370
397
  React.createElement(HelperText, null,
371
398
  React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('Title is required'))))))),
372
399
  React.createElement(GridItem, { span: 12 },
@@ -374,8 +401,8 @@ export function RequestEscalationModal(props) {
374
401
  t('Contact preference'),
375
402
  " "), isRequired: true, fieldId: "contact-preference", role: "radiogroup" },
376
403
  React.createElement("div", { className: "pf-v6-u-display-flex pf-v6-u-flex-direction-row contact-preference-group" },
377
- 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' })), className: "pf-v6-u-mr-lg" }),
378
- 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' })), className: "pf-v6-u-mr-lg" }),
404
+ 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' } }),
405
+ 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' } }),
379
406
  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: '' })) })),
380
407
  submitButtonIsClicked && !formState.contactPreference && (React.createElement(FormHelperText, null,
381
408
  React.createElement(HelperText, null,
@@ -386,15 +413,21 @@ export function RequestEscalationModal(props) {
386
413
  React.createElement(FormGroup, { label: React.createElement(React.Fragment, null,
387
414
  t("Case owner's phone number"),
388
415
  " "), isRequired: true, fieldId: "phone-number" },
389
- React.createElement(PhoneInput, { phoneValue: formState.phoneNumber || '', countryCode: ((_a = formState.countryCode) === null || _a === void 0 ? void 0 : _a.replace('+', '')) || '', onPhoneValueChange: (phone) => setFormState(Object.assign(Object.assign({}, formState), { phoneNumber: phone })), onCountryCodeChange: (code) => setFormState(Object.assign(Object.assign({}, formState), { countryCode: code })), validations: submitButtonIsClicked && isEmpty(formState.phoneNumber)
416
+ 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 && !isPhoneNumberValid(formState.phoneNumber)) ||
417
+ isPhoneInvalid
390
418
  ? 'error'
391
- : 'default', isDisabled: false }),
419
+ : 'default', isDisabled: false, invalid: isPhoneInvalid, setInvalid: setIsPhoneInvalid }),
392
420
  React.createElement(FormHelperText, null,
393
421
  React.createElement(HelperText, null,
394
422
  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.')))),
395
- submitButtonIsClicked && isEmpty(formState.phoneNumber) && (React.createElement(FormHelperText, null,
423
+ submitButtonIsClicked &&
424
+ !isPhoneNumberValid(formState.phoneNumber) &&
425
+ !isPhoneInvalid && (React.createElement(FormHelperText, null,
426
+ React.createElement(HelperText, null,
427
+ React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('Phone number is required'))))),
428
+ isPhoneInvalid && (React.createElement(FormHelperText, null,
396
429
  React.createElement(HelperText, null,
397
- React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('Phone number is required'))))))),
430
+ React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('Phone number can only have digits.'))))))),
398
431
  React.createElement(GridItem, { span: 12 },
399
432
  React.createElement(FormGroup, { label: React.createElement(React.Fragment, null,
400
433
  t('Timezone'),
@@ -404,7 +437,7 @@ export function RequestEscalationModal(props) {
404
437
  value: '',
405
438
  label: 'Select timezone',
406
439
  }, options: TIMEZONE_OPTIONS, onSelect: (option) => setFormState(Object.assign(Object.assign({}, formState), { timezone: option.value })), placeholder: t('Select timezone') })),
407
- submitButtonIsClicked && isEmpty(formState.timezone) && (React.createElement(FormHelperText, null,
440
+ submitButtonIsClicked && !((_o = formState.timezone) === null || _o === void 0 ? void 0 : _o.trim()) && (React.createElement(FormHelperText, null,
408
441
  React.createElement(HelperText, null,
409
442
  React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('Timezone is required'))))))),
410
443
  React.createElement(GridItem, { span: 12 },
@@ -414,26 +447,26 @@ export function RequestEscalationModal(props) {
414
447
  React.createElement("div", { className: "pf-v6-u-display-flex pf-v6-u-align-items-center pf-v6-u-flex-nowrap time-fields-container" },
415
448
  React.createElement("span", { className: "time-label pf-v6-u-mr-sm" }, t('from')),
416
449
  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: {
417
- validated: submitButtonIsClicked && isEmpty(formState.preferredTimeFrom)
450
+ validated: submitButtonIsClicked && !((_p = formState.preferredTimeFrom) === null || _p === void 0 ? void 0 : _p.trim())
418
451
  ? ValidatedOptions.error
419
452
  : ValidatedOptions.default,
420
453
  } }),
421
454
  React.createElement("span", { className: "time-label pf-v6-u-mx-md" }, t('to')),
422
455
  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: {
423
456
  validated: submitButtonIsClicked &&
424
- (isEmpty(formState.preferredTimeTo) ||
457
+ (!((_q = formState.preferredTimeTo) === null || _q === void 0 ? void 0 : _q.trim()) ||
425
458
  !isValidTimeRange(formState.preferredTimeFrom || '', formState.preferredTimeTo || ''))
426
459
  ? ValidatedOptions.error
427
460
  : ValidatedOptions.default,
428
461
  } })),
429
462
  submitButtonIsClicked &&
430
- (isEmpty(formState.preferredTimeFrom) ||
431
- isEmpty(formState.preferredTimeTo)) && (React.createElement(FormHelperText, null,
463
+ (!((_r = formState.preferredTimeFrom) === null || _r === void 0 ? void 0 : _r.trim()) ||
464
+ !((_s = formState.preferredTimeTo) === null || _s === void 0 ? void 0 : _s.trim())) && (React.createElement(FormHelperText, null,
432
465
  React.createElement(HelperText, null,
433
466
  React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('Preferred time is required'))))),
434
467
  submitButtonIsClicked &&
435
- formState.preferredTimeFrom &&
436
- formState.preferredTimeTo &&
468
+ ((_t = formState.preferredTimeFrom) === null || _t === void 0 ? void 0 : _t.trim()) &&
469
+ ((_u = formState.preferredTimeTo) === null || _u === void 0 ? void 0 : _u.trim()) &&
437
470
  !isValidTimeRange(formState.preferredTimeFrom, formState.preferredTimeTo) && (React.createElement(FormHelperText, null,
438
471
  React.createElement(HelperText, null,
439
472
  React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('End time must be after start time'))))))))))))));
@@ -444,7 +477,7 @@ export function RequestEscalationModal(props) {
444
477
  React.createElement(Trans, null, "Learn more about escalation cases."))),
445
478
  React.createElement(ModalBody, null,
446
479
  creationError && (React.createElement(AlertMessage, { variant: AlertType.DANGER, title: t('Could not create case escalation'), show: creationError, onClose: onErrorClose, isInline: true, className: "pf-v6-u-mb-md", "aria-label": t('Could not create case escalation') })),
447
- React.createElement(Wizard, { navAriaLabel: t('Escalation request steps'), footer: CustomFooter },
480
+ React.createElement(Wizard, { navAriaLabel: t('Escalation request steps'), footer: CustomFooter, nav: customNav },
448
481
  escalationDetailsStep,
449
482
  contactDetailsStep))));
450
483
  }
@@ -1 +1 @@
1
- {"version":3,"file":"NewEssTermsModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.tsx"],"names":[],"mappings":"AAiBA,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;AAiBD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBAmY7C"}
1
+ {"version":3,"file":"NewEssTermsModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.tsx"],"names":[],"mappings":"AAiBA,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;AA4BD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBAmY7C"}
@@ -35,6 +35,14 @@ const getLocaleNameFromLocalCode = (localeCode) => {
35
35
  }
36
36
  return localeCode;
37
37
  };
38
+ const formatSessionLinks = (sessionLink) => {
39
+ const links = sessionLink
40
+ .split(/[;,| \n\r\t]+/)
41
+ .map((link) => link.trim())
42
+ .filter(Boolean);
43
+ const formattedLinks = links.map((link) => `[${link}](${link})`).join('\n');
44
+ return formattedLinks;
45
+ };
38
46
  export function NewEssTermsModal(props) {
39
47
  const { t } = useTranslation();
40
48
  const { remoteSessionTermsAcked } = useCaseSelector((state) => ({
@@ -119,7 +127,7 @@ export function NewEssTermsModal(props) {
119
127
  };
120
128
  // Function to ack remote session terms and post comment
121
129
  const submitRemoteSessionAgreement = (pdfId) => __awaiter(this, void 0, void 0, function* () {
122
- const requestComment = t(`\n**Thank you for submitting the request for a remote session. A support manager will review the request, and updates will be provided in the support case. Please continue to provide any data requested by the support engineers in the case prior to the remote session (if applicable).**\n\nSubmitted a remote session request with following details:\n\n**Preferred Time and Expectations of remote session**\n${sessionExpectations}\n\n**Describe the impact to you or the business**\n${impact}\n\n${sessionLink ? `**Remote session link**\n${sessionLink}\n\n` : ''}This action does not initiate a remote session. A Red Hat Associate will get back to you soon.`);
130
+ const requestComment = t(`\n**Thank you for submitting the request for a remote session. A support manager will review the request, and updates will be provided in the support case. Please continue to provide any data requested by the support engineers in the case prior to the remote session (if applicable).**\n\nSubmitted a remote session request with following details:\n\n**Preferred Time and Expectations of remote session**\n${sessionExpectations}\n\n**Describe the impact to you or the business**\n${impact}\n\n${sessionLink ? `**Remote session link**\n${formatSessionLinks(sessionLink)}\n\n` : ''}This action does not initiate a remote session. A Red Hat Associate will get back to you soon.`);
123
131
  try {
124
132
  yield updateCaseDetails(caseDispatch, props.caseNumber, {
125
133
  remoteSessionTermsAcked: true,
@@ -1 +1 @@
1
- {"version":3,"file":"RemoteSessionAgreementModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.tsx"],"names":[],"mappings":"AAiBA,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;AAiBD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBA0XxD"}
1
+ {"version":3,"file":"RemoteSessionAgreementModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.tsx"],"names":[],"mappings":"AAiBA,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;AA4BD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBA0XxD"}
@@ -35,6 +35,14 @@ const getLocaleNameFromLocalCode = (localeCode) => {
35
35
  }
36
36
  return localeCode;
37
37
  };
38
+ const formatSessionLinks = (sessionLink) => {
39
+ const links = sessionLink
40
+ .split(/[;,| \n\r\t]+/)
41
+ .map((link) => link.trim())
42
+ .filter(Boolean);
43
+ const formattedLinks = links.map((link) => `[${link}](${link})`).join('\n');
44
+ return formattedLinks;
45
+ };
38
46
  export function RemoteSessionAgreementModal(props) {
39
47
  const { t } = useTranslation();
40
48
  const { remoteSessionTermsAcked } = useCaseSelector((state) => ({
@@ -109,7 +117,7 @@ export function RemoteSessionAgreementModal(props) {
109
117
  const toggleRemoteSessionForm = () => setIsRemoteSessionForm(true);
110
118
  // Function to ack remote session terms and post comment
111
119
  const submitRemoteSessionAgreement = (pdfId) => __awaiter(this, void 0, void 0, function* () {
112
- const requestComment = t(`\n**Thank you for submitting the request for a remote session. A support manager will review the request, and updates will be provided in the support case. Please continue to provide any data requested by the support engineers in the case prior to the remote session (if applicable).**\n\nSubmitted a remote session request with following details:\n\n**Preferred Time and Expectations of remote session**\n${sessionExpectations}\n\n**Describe the impact to you or the business**\n${impact}\n\n${sessionLink ? `**Remote session link**\n${sessionLink}\n\n` : ''}This action does not initiate a remote session. A Red Hat Associate will get back to you soon.`);
120
+ const requestComment = t(`\n**Thank you for submitting the request for a remote session. A support manager will review the request, and updates will be provided in the support case. Please continue to provide any data requested by the support engineers in the case prior to the remote session (if applicable).**\n\nSubmitted a remote session request with following details:\n\n**Preferred Time and Expectations of remote session**\n${sessionExpectations}\n\n**Describe the impact to you or the business**\n${impact}\n\n${sessionLink ? `**Remote session link**\n${formatSessionLinks(sessionLink)}\n\n` : ''}This action does not initiate a remote session. A Red Hat Associate will get back to you soon.`);
113
121
  try {
114
122
  yield updateCaseDetails(caseDispatch, props.caseNumber, {
115
123
  remoteSessionTermsAcked: true,
@@ -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;;uBAyUb,CAAC;AAEF,eAAe,QAAQ,CAAC"}
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, null,
444
- "Try ",
445
- React.createElement("a", { href: "#", onClick: handleReload }, "reloading the page"),
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) }, "Reset"))),
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" }, "Newest to Oldest"),
468
- React.createElement(SelectOption, { value: "Oldest to Newest" }, "Oldest to Newest")))),
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" },
@@ -154,7 +154,7 @@ function Fts(props) {
154
154
  const maxLengthErrorMessage = t('Contact information cannot be more than {{limit}} characters.', {
155
155
  limit: CONTACT_INFO_24X7_LIMIT,
156
156
  });
157
- if (isEmpty(caseNumber) && !showFtsOnCreateCasePage(entitlementSla, severity))
157
+ if (isEmpty(caseNumber) && (!showFtsOnCreateCasePage(entitlementSla, severity) || isIdea))
158
158
  return React.createElement(React.Fragment, null);
159
159
  if (!isEmpty(caseNumber) && (isIdea || !showFtsOnCaseViewEditPage(entitlementSla, severity)))
160
160
  return React.createElement(React.Fragment, null);
@@ -1 +1 @@
1
- {"version":3,"file":"Review.d.ts","sourceRoot":"","sources":["../../../../src/components/Review/Review.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAqBlE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AACD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,MAAM,qBAsE3C"}
1
+ {"version":3,"file":"Review.d.ts","sourceRoot":"","sources":["../../../../src/components/Review/Review.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAqBlE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AACD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,MAAM,qBA2E3C"}
@@ -1,5 +1,6 @@
1
1
  import { Grid, GridItem } from '@patternfly/react-core';
2
2
  import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
3
+ import { PreviousCaseTypes } from '@rh-support/utils';
3
4
  import isEmpty from 'lodash/isEmpty';
4
5
  import isEqual from 'lodash/isEqual';
5
6
  import React, { useContext } from 'react';
@@ -26,9 +27,10 @@ import { AllProductsSelector } from '../ProductSelector/AllProductsSelector';
26
27
  import { EARuleWidget } from '../Recommendations/EARules/EARuleWidget';
27
28
  export default function Review(props) {
28
29
  const caseDispatch = useCaseDispatch();
29
- const { contactInfo24x7, ABTestVariation } = useCaseSelector((state) => ({
30
+ const { contactInfo24x7, ABTestVariation, caseType } = useCaseSelector((state) => ({
30
31
  contactInfo24x7: state.caseDetails.contactInfo24x7,
31
32
  ABTestVariation: state.ABTestVariation,
33
+ caseType: state.caseDetails.caseType,
32
34
  }), isEqual);
33
35
  const ability = useContext(AbilityContext);
34
36
  const canSeeEmailNotifications = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_SEND_NOTIFICATIONS);
@@ -43,9 +45,9 @@ export default function Review(props) {
43
45
  React.createElement(OwnerSelector, null),
44
46
  React.createElement(AllProductsSelector, { routeProps: props.routeProps, loadTCOnChange: true, showTCAfterButtonClicked: true, checkEntitledProduct: true, isOnReviewPage: true }),
45
47
  React.createElement(OpenShiftClusterId, null),
46
- React.createElement(Hostname, null),
47
- React.createElement(KtQuestions, { inlineEditable: true, hideSaveCancel: true }),
48
- React.createElement(CaseType, { hideIdea: true }),
48
+ caseType !== PreviousCaseTypes.FEATURE_ENHANCEMENT && React.createElement(Hostname, null),
49
+ React.createElement(KtQuestions, { inlineEditable: true, hideSaveCancel: true, onlyShowKT4: caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT }),
50
+ React.createElement(CaseType, null),
49
51
  React.createElement(SupportLevel, null),
50
52
  React.createElement(Grid, { hasGutter: true },
51
53
  React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xl" },
@@ -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;
@@ -1 +1 @@
1
- {"version":3,"file":"template-de.d.ts","sourceRoot":"","sources":["../../../src/i18n/template-de.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBA29BE"}
1
+ {"version":3,"file":"template-de.d.ts","sourceRoot":"","sources":["../../../src/i18n/template-de.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBA4gCE"}