Skip to content

Commit

Permalink
EPMRPP-91774 || Modal windows should have notification type in the title
Browse files Browse the repository at this point in the history
  • Loading branch information
maria-hambardzumian committed Jun 20, 2024
1 parent bc7c33e commit 7e2ffc6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import { RadioGroup } from 'componentLibrary/radioGroup';
import { EMAIL } from 'common/constants/pluginNames';
import { FieldTextFlex } from 'componentLibrary/fieldTextFlex';
import { ruleField } from 'pages/inside/projectSettingsPageContainer/content/notifications/propTypes';
import { capitalizeWord } from 'pages/inside/projectSettingsPageContainer/content/notifications/modals/addEditNotificationModal/util';
import { RecipientsContainer } from './recipientsContainer';
import { LaunchNamesContainer } from './launchNamesContainer';
import {
Expand Down Expand Up @@ -70,7 +71,7 @@ const cx = className.bind(styles);
const messages = defineMessages({
title: {
id: 'AddEditNotificationCaseModal.title',
defaultMessage: '{actionType} Notification Rule',
defaultMessage: '{actionType} {pluginType} Notification Rule',
},
description: {
id: 'AddEditNotificationCaseModal.description',
Expand Down Expand Up @@ -323,6 +324,7 @@ const AddEditNotificationModal = ({
<ModalLayout
title={formatMessage(messages.title, {
actionType: formatMessage(messages[data.actionType]),
pluginType: capitalizeWord(data.type),
})}
okButton={okButton}
cancelButton={cancelButton}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const capitalizeWord = (word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();

0 comments on commit 7e2ffc6

Please sign in to comment.