Skip to content

Commit

Permalink
EPMRPP-87545 || Rebase the feature/organization branch onto develop
Browse files Browse the repository at this point in the history
  • Loading branch information
BlazarQSO committed Dec 19, 2023
1 parent 1fd3ba7 commit fd13d5b
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 45 deletions.
2 changes: 1 addition & 1 deletion app/src/common/constants/permissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { PROJECT_MANAGER, MEMBER } from 'common/constants/projectRoles';
import { PROJECT_MANAGER, OPERATOR, CUSTOMER, MEMBER } from 'common/constants/projectRoles';

export const ALL = 'ALL';
export const OWNER = 'OWNER';
Expand Down
2 changes: 2 additions & 0 deletions app/src/common/constants/projectRoles.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

export const PROJECT_MANAGER = 'PROJECT_MANAGER';
export const MEMBER = 'MEMBER';
export const CUSTOMER = 'CUSTOMER';
export const OPERATOR = 'OPERATOR';
export const PROJECT_ROLES = [MEMBER, PROJECT_MANAGER];
export const DEFAULT_PROJECT_ROLE = MEMBER;
export const ROLES_MAP = [
Expand Down
1 change: 1 addition & 0 deletions app/src/common/constants/projectSections.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@
export const MEMBERS = 'members';
export const MONITORING = 'monitoring';
export const SETTINGS = 'settings';
export const EVENTS = 'events';
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ import { ScrollWrapper } from 'components/main/scrollWrapper';
import { getItemNameConfig } from 'components/widgets/common/utils';
import { formatAttribute } from 'common/utils/attributeUtils';
import { projectOrganizationSlugSelector } from 'controllers/project';
import { projectOrganizationSlugSelector } from 'controllers/project';
import { activeProjectKeySelector } from 'controllers/user';
import { defaultDefectsMessages, defaultStatisticsMessages } from '../components/messages';
import { getStatisticsStatuses, groupFieldsWithDefectTypes } from '../components/utils';
Expand Down
2 changes: 0 additions & 2 deletions app/src/controllers/administrate/sagas.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

import { all, select, put, takeEvery } from 'redux-saga/effects';
import { MONITORING, MEMBERS } from 'common/constants/projectSections';
import { projectSectionSelector } from 'controllers/pages';
import { MEMBERS } from 'common/constants/projectSections';
import { projectSectionSelector, urlProjectKeySelector } from 'controllers/pages';
import { fetchProjectAction } from 'controllers/project';
import { fetchMembersAction } from 'controllers/members';
Expand Down
3 changes: 1 addition & 2 deletions app/src/controllers/filter/sagas.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import { FETCH_PROJECT_PREFERENCES_SUCCESS } from 'controllers/project/constants
import { launchDistinctSelector } from 'controllers/launch/selectors';
import { fetchLaunchesAction } from 'controllers/launch/actionCreators';
import { projectOrganizationSlugSelector } from 'controllers/project';
import { launchDistinctSelector } from 'controllers/launch';
import { PROJECT_LAUNCHES_PAGE } from 'controllers/pages';
import { omit } from 'common/utils/omit';
import { NEW_FILTER_PREFIX } from 'common/constants/reservedFilterIds';
Expand Down Expand Up @@ -106,7 +105,7 @@ function* updateLaunchesFilter({ payload: filter }) {
);
}

function* changeActiveFilter({ payload: filterId }) {
function* changeActiveFilter({ payload: filterId, meta }) {
const organizationSlug = yield select(projectOrganizationSlugSelector);
const projectKey = yield select(activeProjectKeySelector);

Expand Down
5 changes: 0 additions & 5 deletions app/src/controllers/user/sagas.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,11 @@ import { userIdSelector, userInfoSelector } from './selectors';
import {
ASSIGN_TO_PROJECT,
UNASSIGN_FROM_PROJECT,
SET_ACTIVE_PROJECT,
ADD_API_KEY,
FETCH_API_KEYS,
DELETE_API_KEY,
FETCH_USER,
DELETE_USER_ACCOUNT,
GENERATE_API_TOKEN,
FETCH_API_TOKEN,
FETCH_USER,
SET_ACTIVE_PROJECT_KEY,
} from './constants';
import {
Expand Down Expand Up @@ -146,7 +142,6 @@ function* fetchUserWorker() {
const activeProjectName =
user.assignedProjects[savedActiveProjectKey]?.projectName ?? defaultProjectName;

yield put(fetchApiTokenAction());
yield put(setActiveProjectAction(activeProjectName));
yield put(setActiveProjectKeyAction(activeProjectKey));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { PROJECT_MANAGER, MEMBER } from 'common/constants/projectRoles';
import { PROJECT_MANAGER, MEMBER, OPERATOR, CUSTOMER } from 'common/constants/projectRoles';
import { ALL, OWNER } from 'common/constants/permissions';

export const ACTIONS = {
Expand All @@ -32,7 +32,6 @@ export const ACTIONS = {
EDIT_DELETE_ITEM: 'EDIT_DELETE_ITEM',
RERUN_LAUNCHES: 'RERUN_LAUNCHES',
CHANGE_STATUS: 'CHANGE_STATUS',
EDIT_DELETE_ITEM: 'EDIT_DELETE_ITEM',
};

export const PERMISSIONS_MAP = {
Expand Down
10 changes: 1 addition & 9 deletions app/src/pages/inside/dashboardItemPage/dashboardItemPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,7 @@ import {
deleteDashboardAction,
updateDashboardAction,
} from 'controllers/dashboard';
<<<<<<< HEAD
import { userInfoSelector } from 'controllers/user';
=======
import {
userInfoSelector,
activeProjectRoleSelector,
activeProjectKeySelector,
} from 'controllers/user';
>>>>>>> 01f1459e2 (EPMRPP 79767 || reduce selectors for new routing (#3284))
import { userInfoSelector, activeProjectKeySelector } from 'controllers/user';
import {
PROJECT_DASHBOARD_PAGE,
PROJECT_DASHBOARD_PRINT_PAGE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { PROJECT_DASHBOARD_ITEM_PAGE } from 'controllers/pages';
import { activeProjectKeySelector, activeProjectRoleSelector } from 'controllers/user';
import { Icon } from 'components/main/icon';
import { NavLink } from 'components/main/navLink';
import { canEditDashboard, canDeleteDashboard } from 'common/utils/permissions';
import { projectOrganizationSlugSelector } from 'controllers/project';
import styles from './dashboardGridItem.scss';

Expand Down Expand Up @@ -81,15 +80,8 @@ export class DashboardGridItem extends Component {
};

render() {
const {
item,
currentUser: { userId, userRole },
projectKey,
projectRole,
organizationSlug,
} = this.props;
const { item, projectKey, organizationSlug } = this.props;
const { name, description, owner, id } = item;
const isOwner = userId === owner;

return (
<div className={cx('grid-view')}>
Expand All @@ -115,16 +107,12 @@ export class DashboardGridItem extends Component {
<p>{description}</p>
</div>
<div className={cx('grid-cell', 'owner')}>{owner}</div>
{canEditDashboard(userRole, projectRole, isOwner) && (
<div className={cx('grid-cell', 'edit')} onClick={this.editItem}>
<Icon type="icon-pencil" />
</div>
)}
{canDeleteDashboard(userRole, projectRole, isOwner) && (
<div className={cx('grid-cell', 'delete')} onClick={this.deleteItem}>
<Icon type="icon-close" />
</div>
)}
<div className={cx('grid-cell', 'edit')} onClick={this.editItem}>
<Icon type="icon-pencil" />
</div>
<div className={cx('grid-cell', 'delete')} onClick={this.deleteItem}>
<Icon type="icon-close" />
</div>
</NavLink>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@ import { FieldText } from 'componentLibrary/fieldText';
import { Checkbox } from 'componentLibrary/checkbox';
import { PROJECT_SETTINGS_NOTIFICATIONS_EVENTS } from 'analyticsEvents/projectSettingsPageEvents';
import { AttributeListFormField } from 'components/containers/AttributeListFormField';
<<<<<<< HEAD
import { RadioGroup } from 'componentLibrary/radioGroup';
=======
>>>>>>> 465d0e092 (Fix linter errors (#3320))
import { RecipientsContainer } from './recipientsContainer';
import { LaunchNamesContainer } from './launchNamesContainer';
import {
Expand Down
2 changes: 1 addition & 1 deletion app/src/routes/routesMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ import {
import { GENERAL, AUTHORIZATION_CONFIGURATION, ANALYTICS } from 'common/constants/settingsTabs';
import { ADMINISTRATOR } from 'common/constants/accountRoles';
import { INSTALLED, STORE } from 'common/constants/pluginsTabs';
import { MEMBERS, MONITORING } from 'common/constants/projectSections';
import { MEMBERS, SETTINGS, EVENTS } from 'common/constants/projectSections';
import { ANONYMOUS_REDIRECT_PATH_STORAGE_KEY, isAuthorizedSelector } from 'controllers/auth';
import {
fetchDashboardsAction,
Expand Down

0 comments on commit fd13d5b

Please sign in to comment.