- {item.launchNames.length > 0 && (
+ {launchNames.length > 0 && (
<>
{formatMessage(messages.launchNameLabel)}
-
{item.launchNames.join(SEPARATOR)}
+
{launchNames.join(SEPARATOR)}
>
)}
{formatMessage(messages.inCaseLabel)}
-
{inCaseOptions[item.sendCase]}
+
{inCaseOptions[sendCase]}
{formatMessage(messages.recipientsLabel)}
-
{recipients.join(SEPARATOR)}
- {item.attributes.length > 0 && (
+
{recipientsValue.join(SEPARATOR)}
+ {attributes.length > 0 && (
<>
-
{formatMessage(messages.attributesLabel)}
+
{getAttributesFieldText()}
>
)}
@@ -118,5 +140,6 @@ NotificationRuleContent.propTypes = {
recipients: PropTypes.array,
attributes: PropTypes.array,
informOwner: PropTypes.bool,
+ attributesOperator: PropTypes.oneOf([ATTRIBUTES_OPERATORS.AND, ATTRIBUTES_OPERATORS.OR]),
}).isRequired,
};
diff --git a/app/src/pages/inside/projectSettingsPageContainer/content/elements/notificationRuleContent/notificationRuleContent.scss b/app/src/pages/inside/projectSettingsPageContainer/content/elements/notificationRuleContent/notificationRuleContent.scss
index e7f4d58d89..c3473753b3 100644
--- a/app/src/pages/inside/projectSettingsPageContainer/content/elements/notificationRuleContent/notificationRuleContent.scss
+++ b/app/src/pages/inside/projectSettingsPageContainer/content/elements/notificationRuleContent/notificationRuleContent.scss
@@ -37,3 +37,7 @@
color: $COLOR--almost-black;
margin-bottom: 16px;
}
+
+.attributes-text {
+ text-transform: none;
+}
diff --git a/app/src/pages/inside/projectSettingsPageContainer/content/integrations/integrationsList/integrationInfo/integrationInfo.jsx b/app/src/pages/inside/projectSettingsPageContainer/content/integrations/integrationsList/integrationInfo/integrationInfo.jsx
index 3e21867f1e..f75db6fce3 100644
--- a/app/src/pages/inside/projectSettingsPageContainer/content/integrations/integrationsList/integrationInfo/integrationInfo.jsx
+++ b/app/src/pages/inside/projectSettingsPageContainer/content/integrations/integrationsList/integrationInfo/integrationInfo.jsx
@@ -225,7 +225,7 @@ export const IntegrationInfo = (props) => {
const onResetProjectIntegration = () => {
dispatch(
showModalAction({
- id: 'deleteProjectIntegrationModal',
+ id: 'deleteIntegrationModal',
data: {
onConfirm: resetProjectIntegrations,
modalTitle: formatMessage(messages.projectIntegrationReset),
diff --git a/app/src/pages/inside/projectSettingsPageContainer/content/notifications/messages.js b/app/src/pages/inside/projectSettingsPageContainer/content/notifications/messages.js
index 73ee4d474d..623a783b03 100644
--- a/app/src/pages/inside/projectSettingsPageContainer/content/notifications/messages.js
+++ b/app/src/pages/inside/projectSettingsPageContainer/content/notifications/messages.js
@@ -58,10 +58,6 @@ export const messages = defineMessages({
id: 'NotificationCase.attributesLabel',
defaultMessage: 'Attributes (and)',
},
- attributesNote: {
- id: 'NotificationCase.attributesNote',
- defaultMessage: 'Send notifications about launches containing specified attributes',
- },
[LAUNCH_CASES.ALWAYS]: {
id: 'NotificationCase.dropdownValueAlways',
defaultMessage: 'Always',
diff --git a/app/src/pages/inside/projectSettingsPageContainer/content/notifications/modals/addEditNotificationModal/addEditNotificationModal.jsx b/app/src/pages/inside/projectSettingsPageContainer/content/notifications/modals/addEditNotificationModal/addEditNotificationModal.jsx
index 8a0dbf446a..7fd76f37cc 100644
--- a/app/src/pages/inside/projectSettingsPageContainer/content/notifications/modals/addEditNotificationModal/addEditNotificationModal.jsx
+++ b/app/src/pages/inside/projectSettingsPageContainer/content/notifications/modals/addEditNotificationModal/addEditNotificationModal.jsx
@@ -1,5 +1,5 @@
/*
- * Copyright 2022 EPAM Systems
+ * Copyright 2023 EPAM Systems
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,7 +39,12 @@ import { AttributeListFormField } from 'components/containers/AttributeListFormF
import { RadioGroup } from 'componentLibrary/radioGroup';
import { RecipientsContainer } from './recipientsContainer';
import { LaunchNamesContainer } from './launchNamesContainer';
-import { FieldElement } from '../../../elements';
+import {
+ FieldElement,
+ MODAL_ACTION_TYPE_ADD,
+ MODAL_ACTION_TYPE_EDIT,
+ MODAL_ACTION_TYPE_COPY,
+} from '../../../elements';
import {
ATTRIBUTES_FIELD_KEY,
ATTRIBUTES_OPERATORS,
@@ -65,15 +70,15 @@ const messages = defineMessages({
id: 'AddEditNotificationCaseModal.description',
defaultMessage: 'Select conditions to create a notification rule',
},
- add: {
+ [MODAL_ACTION_TYPE_ADD]: {
id: 'AddEditNotificationCaseModal.newRuleMessage',
defaultMessage: 'Create',
},
- edit: {
+ [MODAL_ACTION_TYPE_EDIT]: {
id: 'AddEditNotificationCaseModal.editRuleMessage',
defaultMessage: 'Edit',
},
- copy: {
+ [MODAL_ACTION_TYPE_COPY]: {
id: 'AddEditNotificationCaseModal.copyRuleMessage',
defaultMessage: 'Duplicate',
},
@@ -113,10 +118,6 @@ const messages = defineMessages({
id: 'AddEditNotificationCaseModal.attributesLabel',
defaultMessage: 'Attributes',
},
- attributesNote: {
- id: 'AddEditNotificationCaseModal.attributesNote',
- defaultMessage: 'Send notifications about launches containing specified attributes',
- },
attributesNotActive: {
id: 'AddEditNotificationCaseModal.attributesNotActive',
defaultMessage: 'Attributes are non active. To activate please select checkbox ‘Attributes’',
@@ -185,6 +186,10 @@ const messages = defineMessages({
id: 'NotificationsEnableForm.attributes',
defaultMessage: 'Attributes',
},
+ attributesNote: {
+ id: 'AddEditNotificationCaseModal.attributesNote',
+ defaultMessage: 'Notify if the launch has all/at least one of specified attributes',
+ },
});
const NOTIFICATION_FORM = 'notificationForm';
@@ -270,7 +275,10 @@ const AddEditNotificationModal = ({
};
const okButton = {
- text: formatMessage(COMMON_LOCALE_KEYS.SAVE),
+ text:
+ actionType === MODAL_ACTION_TYPE_ADD
+ ? formatMessage(COMMON_LOCALE_KEYS.CREATE)
+ : formatMessage(COMMON_LOCALE_KEYS.SAVE),
onClick: () => {
handleSubmit(submitActions)();
},
@@ -377,6 +385,7 @@ const AddEditNotificationModal = ({
setShowEditor={setShowEditor}
shown={isEditorShown}
changeValue={change}
+ attributesNote={formatMessage(messages.attributesNote)}
/>
{attributesValue.length > 0 && (
@@ -398,7 +407,11 @@ AddEditNotificationModal.propTypes = {
notifications: PropTypes.array,
onSave: PropTypes.func,
eventsInfo: PropTypes.object,
- actionType: PropTypes.string,
+ actionType: PropTypes.oneOf([
+ MODAL_ACTION_TYPE_ADD,
+ MODAL_ACTION_TYPE_EDIT,
+ MODAL_ACTION_TYPE_COPY,
+ ]),
}),
initialize: PropTypes.func.isRequired,
handleSubmit: PropTypes.func.isRequired,
diff --git a/app/src/pages/inside/projectSettingsPageContainer/content/notifications/notifications.jsx b/app/src/pages/inside/projectSettingsPageContainer/content/notifications/notifications.jsx
index e0b950ae2c..5def731df3 100644
--- a/app/src/pages/inside/projectSettingsPageContainer/content/notifications/notifications.jsx
+++ b/app/src/pages/inside/projectSettingsPageContainer/content/notifications/notifications.jsx
@@ -1,5 +1,5 @@
/*
- * Copyright 2022 EPAM Systems
+ * Copyright 2023 EPAM Systems
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -47,7 +47,14 @@ import { projectNotificationsLoadingSelector } from 'controllers/project/selecto
import { SpinningPreloader } from 'components/preloaders/spinningPreloader';
import { PROJECT_SETTINGS_NOTIFICATIONS_EVENTS } from 'analyticsEvents/projectSettingsPageEvents';
import { docsReferences, createExternalLink } from 'common/utils';
-import { RuleList, FieldElement, NotificationRuleContent } from '../elements';
+import {
+ RuleList,
+ FieldElement,
+ NotificationRuleContent,
+ MODAL_ACTION_TYPE_ADD,
+ MODAL_ACTION_TYPE_EDIT,
+ MODAL_ACTION_TYPE_COPY,
+} from '../elements';
import { Layout } from '../layout';
import { SettingsPageContent } from '../settingsPageContent';
import styles from './notifications.scss';
@@ -118,7 +125,7 @@ export const Notifications = ({ setHeaderTitleNode }) => {
showModalAction({
id: 'addEditNotificationModal',
data: {
- actionType: 'add',
+ actionType: MODAL_ACTION_TYPE_ADD,
onSave: confirmAdd,
notification: DEFAULT_CASE_CONFIG,
notifications,
@@ -134,7 +141,7 @@ export const Notifications = ({ setHeaderTitleNode }) => {
showModalAction({
id: 'addEditNotificationModal',
data: {
- actionType: 'edit',
+ actionType: MODAL_ACTION_TYPE_EDIT,
onSave: confirmEdit,
notification,
notifications,
@@ -164,7 +171,7 @@ export const Notifications = ({ setHeaderTitleNode }) => {
showModalAction({
id: 'addEditNotificationModal',
data: {
- actionType: 'copy',
+ actionType: MODAL_ACTION_TYPE_COPY,
onSave: (withoutAttributes) => confirmAdd(withoutAttributes),
notification: {
...newNotification,
diff --git a/app/src/pages/inside/projectSettingsPageContainer/content/patternAnalysis/modals/createPatternAnalysisModal/createPatternAnalysisModal.jsx b/app/src/pages/inside/projectSettingsPageContainer/content/patternAnalysis/modals/createPatternAnalysisModal/createPatternAnalysisModal.jsx
index e6b216cf36..c483c09479 100644
--- a/app/src/pages/inside/projectSettingsPageContainer/content/patternAnalysis/modals/createPatternAnalysisModal/createPatternAnalysisModal.jsx
+++ b/app/src/pages/inside/projectSettingsPageContainer/content/patternAnalysis/modals/createPatternAnalysisModal/createPatternAnalysisModal.jsx
@@ -1,5 +1,5 @@
/*
- * Copyright 2022 EPAM Systems
+ * Copyright 2023 EPAM Systems
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -54,7 +54,7 @@ const CreatePatternAnalysisModal = ({ data, handleSubmit, initialize, dirty }) =
const { formatMessage } = useIntl();
const okButton = {
- text: formatMessage(COMMON_LOCALE_KEYS.SAVE),
+ text: formatMessage(COMMON_LOCALE_KEYS.CREATE),
onClick: () => handleSubmit(onSave)(),
};
const cancelButton = {