+ {!shown && value?.length ? formatMessage(messages.attributesNotActive) : attributesNote}
+
- {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/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 239c5795a5..9317baa831 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
@@ -112,10 +112,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’',
@@ -184,6 +180,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 FIELD = 'Field';
@@ -377,6 +377,7 @@ const AddEditNotificationModal = ({
setShowEditor={setShowEditor}
shown={isEditorShown}
changeValue={change}
+ attributesNote={formatMessage(messages.attributesNote)}
/>
{attributesValue.length > 0 && (
From 64b2e675864b41db4f8298da2512fa4500898bd1 Mon Sep 17 00:00:00 2001
From: Bam6ycha <84175555+Bam6ycha@users.noreply.github.com>
Date: Tue, 7 Nov 2023 12:48:03 +0500
Subject: [PATCH 3/9] EPMRPP-79105 || Fix modal closing on click outside
(#3638)
---
app/src/common/hooks/useOnClickOutside.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/src/common/hooks/useOnClickOutside.js b/app/src/common/hooks/useOnClickOutside.js
index f3d01ee40b..ce4d582bcd 100644
--- a/app/src/common/hooks/useOnClickOutside.js
+++ b/app/src/common/hooks/useOnClickOutside.js
@@ -28,10 +28,10 @@ export const useOnClickOutside = (ref, handler) => {
}
};
- document.addEventListener('pointerdown', listener);
+ document.addEventListener('pointerup', listener);
return () => {
- document.removeEventListener('pointerdown', listener);
+ document.removeEventListener('pointerup', listener);
};
}, [ref, handler]);
};
From 70b4f49bbbdab733f11840cf9cbe44d4cdca56ea Mon Sep 17 00:00:00 2001
From: Iukou Siarhei <45054016+BlazarQSO@users.noreply.github.com>
Date: Wed, 8 Nov 2023 16:49:58 +0300
Subject: [PATCH 4/9] =?UTF-8?q?EPMRPP-87386=20||=20=D0=A1orrect=20the=20di?=
=?UTF-8?q?splay=20of=20the=20Delete=20account=20button=20(#3640)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/src/controllers/administrate/projects/reducer.js | 4 ++--
.../administrate/projects/reducer.test.js | 6 +++---
app/src/controllers/appInfo/constants.js | 2 +-
app/src/controllers/appInfo/selectors.js | 4 ++--
app/src/controllers/user/actionCreators.js | 12 ++++++------
app/src/controllers/user/constants.js | 6 +++---
app/src/controllers/user/index.js | 6 +++---
app/src/controllers/user/reducer.js | 6 +++---
app/src/controllers/user/reducer.test.js | 6 +++---
app/src/controllers/user/sagas.js | 4 ++--
app/src/pages/inside/profilePage/profilePage.jsx | 6 +++++-
11 files changed, 33 insertions(+), 29 deletions(-)
diff --git a/app/src/controllers/administrate/projects/reducer.js b/app/src/controllers/administrate/projects/reducer.js
index e8d2253083..cf3d345981 100644
--- a/app/src/controllers/administrate/projects/reducer.js
+++ b/app/src/controllers/administrate/projects/reducer.js
@@ -20,7 +20,7 @@ import { paginationReducer } from 'controllers/pagination';
import { loadingReducer } from 'controllers/loading';
import { PROJECTS_PAGE } from 'controllers/pages';
import { groupOperationsReducer } from 'controllers/groupOperations';
-import { ASSIGN_TO_RROJECT_SUCCESS, UNASSIGN_FROM_PROJECT_SUCCESS } from 'controllers/user';
+import { ASSIGN_TO_PROJECT_SUCCESS, UNASSIGN_FROM_PROJECT_SUCCESS } from 'controllers/user';
import { queueReducers } from 'common/utils/queueReducers';
import { createPageScopedReducer } from 'common/utils/createPageScopedReducer';
import { NAMESPACE, SET_PROJECTS_VIEW_MODE, GRID_VIEW } from './constants';
@@ -42,7 +42,7 @@ export const projectFetchReducer = fetchReducer(NAMESPACE, {
export const assignProjectReducer = (state = [], { type, payload }) => {
switch (type) {
- case ASSIGN_TO_RROJECT_SUCCESS:
+ case ASSIGN_TO_PROJECT_SUCCESS:
return state.map((project) =>
project.projectName === payload.projectName
? { ...project, usersQuantity: project.usersQuantity + 1 }
diff --git a/app/src/controllers/administrate/projects/reducer.test.js b/app/src/controllers/administrate/projects/reducer.test.js
index fb2b3d6486..c24be45e84 100644
--- a/app/src/controllers/administrate/projects/reducer.test.js
+++ b/app/src/controllers/administrate/projects/reducer.test.js
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-import { ASSIGN_TO_RROJECT_SUCCESS, UNASSIGN_FROM_PROJECT_SUCCESS } from 'controllers/user';
+import { ASSIGN_TO_PROJECT_SUCCESS, UNASSIGN_FROM_PROJECT_SUCCESS } from 'controllers/user';
import { FETCH_SUCCESS } from 'controllers/fetch';
import { SET_PROJECTS_VIEW_MODE, TABLE_VIEW, GRID_VIEW, NAMESPACE } from './constants';
import { setViewModeReducer, assignProjectReducer, projectFetchReducer } from './reducer';
@@ -133,12 +133,12 @@ describe('projects reducer', () => {
expect(assignProjectReducer(oldState, [{ id: 2 }])).toBe(oldState);
});
- test('should handle ASSIGN_TO_RROJECT_SUCCESS', () => {
+ test('should handle ASSIGN_TO_PROJECT_SUCCESS', () => {
const payload = {
projectName: PROJECTS[0].projectName,
};
const newState = assignProjectReducer(PROJECTS, {
- type: ASSIGN_TO_RROJECT_SUCCESS,
+ type: ASSIGN_TO_PROJECT_SUCCESS,
payload,
});
expect(newState).toEqual(PROJECTS_AFTER_ASSIGN);
diff --git a/app/src/controllers/appInfo/constants.js b/app/src/controllers/appInfo/constants.js
index 440b82ccfc..d0a2b22f06 100644
--- a/app/src/controllers/appInfo/constants.js
+++ b/app/src/controllers/appInfo/constants.js
@@ -15,7 +15,7 @@
*/
export const APP_INFO_NAMESPACE = 'appInfo';
-export const ANALYICS_INSTANCE_KEY = 'server.details.instance';
+export const ANALYTICS_INSTANCE_KEY = 'server.details.instance';
export const ANALYTICS_ALL_KEY = 'server.analytics.all';
export const OLD_HISTORY_KEY = 'history_old';
export const GA_MEASUREMENT_ID = 'ga_measurement_id';
diff --git a/app/src/controllers/appInfo/selectors.js b/app/src/controllers/appInfo/selectors.js
index 1476810199..b2b1934b8a 100644
--- a/app/src/controllers/appInfo/selectors.js
+++ b/app/src/controllers/appInfo/selectors.js
@@ -15,7 +15,7 @@
*/
import {
- ANALYICS_INSTANCE_KEY,
+ ANALYTICS_INSTANCE_KEY,
ANALYTICS_ALL_KEY,
OLD_HISTORY_KEY,
GA_MEASUREMENT_ID,
@@ -43,7 +43,7 @@ const apiJobsSelector = (state) => apiInfoSelector(state).jobs || {};
const extensionsSelector = (state) => apiInfoSelector(state).extensions || {};
const extensionsConfigSelector = (state) => extensionsSelector(state).result || {};
export const instanceIdSelector = (state) =>
- extensionsConfigSelector(state)[ANALYICS_INSTANCE_KEY] || '';
+ extensionsConfigSelector(state)[ANALYTICS_INSTANCE_KEY] || '';
export const analyticsEnabledSelector = (state) =>
extensionsConfigSelector(state)[ANALYTICS_ALL_KEY] === 'true';
export const analyzerExtensionsSelector = (state) => extensionsSelector(state).analyzers || [];
diff --git a/app/src/controllers/user/actionCreators.js b/app/src/controllers/user/actionCreators.js
index f6c54bd1aa..52fe2012e7 100644
--- a/app/src/controllers/user/actionCreators.js
+++ b/app/src/controllers/user/actionCreators.js
@@ -19,9 +19,9 @@ import {
SET_START_TIME_FORMAT,
SET_API_KEYS,
SET_PHOTO_TIME_STAMP,
- ASSIGN_TO_RROJECT,
- ASSIGN_TO_RROJECT_SUCCESS,
- ASSIGN_TO_RROJECT_ERROR,
+ ASSIGN_TO_PROJECT,
+ ASSIGN_TO_PROJECT_SUCCESS,
+ ASSIGN_TO_PROJECT_ERROR,
UNASSIGN_FROM_PROJECT,
UNASSIGN_FROM_PROJECT_SUCCESS,
FETCH_API_KEYS,
@@ -95,17 +95,17 @@ export const setStartTimeFormatAction = (format) => ({
});
export const assignToProjectAction = (project) => ({
- type: ASSIGN_TO_RROJECT,
+ type: ASSIGN_TO_PROJECT,
payload: project,
});
export const assignToProjectSuccessAction = (projectInfo) => ({
- type: ASSIGN_TO_RROJECT_SUCCESS,
+ type: ASSIGN_TO_PROJECT_SUCCESS,
payload: projectInfo,
});
export const assignToProjectErrorAction = (projectInfo) => ({
- type: ASSIGN_TO_RROJECT_ERROR,
+ type: ASSIGN_TO_PROJECT_ERROR,
payload: projectInfo,
});
diff --git a/app/src/controllers/user/constants.js b/app/src/controllers/user/constants.js
index bc39ef9842..80ad9831d3 100644
--- a/app/src/controllers/user/constants.js
+++ b/app/src/controllers/user/constants.js
@@ -29,9 +29,9 @@ export const SETTINGS_INITIAL_STATE = {
photoTimeStamp: Date.now(),
};
-export const ASSIGN_TO_RROJECT = 'assignToProject';
-export const ASSIGN_TO_RROJECT_SUCCESS = 'assignToProjectSuccess';
-export const ASSIGN_TO_RROJECT_ERROR = 'assignToProjectError';
+export const ASSIGN_TO_PROJECT = 'assignToProject';
+export const ASSIGN_TO_PROJECT_SUCCESS = 'assignToProjectSuccess';
+export const ASSIGN_TO_PROJECT_ERROR = 'assignToProjectError';
export const UNASSIGN_FROM_PROJECT = 'unassignFromProject';
export const UNASSIGN_FROM_PROJECT_SUCCESS = 'unassignFromProjectSuccess';
diff --git a/app/src/controllers/user/index.js b/app/src/controllers/user/index.js
index bb4b6da2a9..4608882069 100644
--- a/app/src/controllers/user/index.js
+++ b/app/src/controllers/user/index.js
@@ -17,9 +17,9 @@
export {
START_TIME_FORMAT_ABSOLUTE,
START_TIME_FORMAT_RELATIVE,
- ASSIGN_TO_RROJECT,
- ASSIGN_TO_RROJECT_SUCCESS,
- ASSIGN_TO_RROJECT_ERROR,
+ ASSIGN_TO_PROJECT,
+ ASSIGN_TO_PROJECT_SUCCESS,
+ ASSIGN_TO_PROJECT_ERROR,
UNASSIGN_FROM_PROJECT_SUCCESS,
SET_ACTIVE_PROJECT,
FETCH_USER_SUCCESS,
diff --git a/app/src/controllers/user/reducer.js b/app/src/controllers/user/reducer.js
index 827586c466..8e98af1694 100644
--- a/app/src/controllers/user/reducer.js
+++ b/app/src/controllers/user/reducer.js
@@ -20,7 +20,7 @@ import {
SET_START_TIME_FORMAT,
SETTINGS_INITIAL_STATE,
SET_PHOTO_TIME_STAMP,
- ASSIGN_TO_RROJECT_SUCCESS,
+ ASSIGN_TO_PROJECT_SUCCESS,
UNASSIGN_FROM_PROJECT_SUCCESS,
FETCH_USER_SUCCESS,
SET_API_KEYS,
@@ -41,7 +41,7 @@ export const settingsReducer = (state = SETTINGS_INITIAL_STATE, { type, payload
export const userAssignedProjectReducer = (state = {}, { type, payload }) => {
switch (type) {
- case ASSIGN_TO_RROJECT_SUCCESS: {
+ case ASSIGN_TO_PROJECT_SUCCESS: {
const { projectName, projectRole, entryType } = payload;
return {
...state,
@@ -73,7 +73,7 @@ export const userInfoReducer = (state = {}, { type, payload }) => {
switch (type) {
case FETCH_USER_SUCCESS:
return payload;
- case ASSIGN_TO_RROJECT_SUCCESS:
+ case ASSIGN_TO_PROJECT_SUCCESS:
case UNASSIGN_FROM_PROJECT_SUCCESS:
return {
...state,
diff --git a/app/src/controllers/user/reducer.test.js b/app/src/controllers/user/reducer.test.js
index 0e131a6561..a2dd665b37 100644
--- a/app/src/controllers/user/reducer.test.js
+++ b/app/src/controllers/user/reducer.test.js
@@ -22,7 +22,7 @@ import {
SETTINGS_INITIAL_STATE,
START_TIME_FORMAT_ABSOLUTE,
SET_PHOTO_TIME_STAMP,
- ASSIGN_TO_RROJECT_SUCCESS,
+ ASSIGN_TO_PROJECT_SUCCESS,
UNASSIGN_FROM_PROJECT_SUCCESS,
SET_API_KEYS,
} from './constants';
@@ -145,7 +145,7 @@ describe('user reducer', () => {
expect(userAssignedProjectReducer(oldState, { type: 'foo' })).toBe(oldState);
});
- test('should handle ASSIGN_TO_RROJECT_SUCCESS', () => {
+ test('should handle ASSIGN_TO_PROJECT_SUCCESS', () => {
const payloadProject = {
projectName: 'superadmin_personal',
entryType: 'INTERNAL',
@@ -163,7 +163,7 @@ describe('user reducer', () => {
};
expect(
userAssignedProjectReducer(oldState, {
- type: ASSIGN_TO_RROJECT_SUCCESS,
+ type: ASSIGN_TO_PROJECT_SUCCESS,
payload: payloadProject,
}),
).toEqual(assignResult);
diff --git a/app/src/controllers/user/sagas.js b/app/src/controllers/user/sagas.js
index b5aafa016e..a94a76b798 100644
--- a/app/src/controllers/user/sagas.js
+++ b/app/src/controllers/user/sagas.js
@@ -22,7 +22,7 @@ import { PROJECT_MANAGER } from 'common/constants/projectRoles';
import { getStorageItem, setStorageItem } from 'common/utils/storageUtils';
import { userIdSelector, userInfoSelector } from './selectors';
import {
- ASSIGN_TO_RROJECT,
+ ASSIGN_TO_PROJECT,
UNASSIGN_FROM_PROJECT,
SET_ACTIVE_PROJECT,
ADD_API_KEY,
@@ -268,7 +268,7 @@ function* watchFetchUser() {
}
function* watchAssignToProject() {
- yield takeLatest(ASSIGN_TO_RROJECT, assignToProject);
+ yield takeLatest(ASSIGN_TO_PROJECT, assignToProject);
}
function* watchUnassignFromProject() {
diff --git a/app/src/pages/inside/profilePage/profilePage.jsx b/app/src/pages/inside/profilePage/profilePage.jsx
index 1c0ce463a7..d3630acbde 100644
--- a/app/src/pages/inside/profilePage/profilePage.jsx
+++ b/app/src/pages/inside/profilePage/profilePage.jsx
@@ -23,6 +23,7 @@ import { connect } from 'react-redux';
import { PageLayout, PageHeader } from 'layouts/pageLayout';
import { PROFILE_PAGE } from 'components/main/analytics/events';
import { userProfileRouteSelector, USER_PROFILE_SUB_PAGE } from 'controllers/pages';
+import { allowDeleteAccountSelector } from 'controllers/appInfo/selectors';
import { NavigationTabs } from 'components/main/navigationTabs';
import {
API_KEYS_ROUTE,
@@ -85,6 +86,7 @@ const getNavigationTabsConfig = (formatMessage) => ({
@connect((state) => ({
activeTab: userProfileRouteSelector(state),
+ allowDeleteAccount: allowDeleteAccountSelector(state),
}))
@injectIntl
@track({ page: PROFILE_PAGE })
@@ -93,11 +95,13 @@ export class ProfilePage extends Component {
intl: PropTypes.object.isRequired,
activeTab: PropTypes.string,
dispatch: PropTypes.func,
+ allowDeleteAccount: PropTypes.bool,
};
static defaultProps = {
activeTab: PROJECT_ASSIGNMENT_ROUTE,
dispatch: () => {},
+ allowDeleteAccount: false,
};
getBreadcrumbs = () => [{ title: this.props.intl.formatMessage(messages.profilePageTitle) }];
@@ -117,7 +121,7 @@ export class ProfilePage extends Component {