Skip to content

Commit

Permalink
EPMRPP-96135 || Modal window doesn't open upon clicking (#4052)
Browse files Browse the repository at this point in the history
* EPMRPP-96135 || Modal window doesn't open upon clicking

* EPMRPP-96135 || Code Review fix - 1
  • Loading branch information
BlazarQSO authored Oct 18, 2024
1 parent 3cdc21b commit c81dbad
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 14 deletions.
7 changes: 1 addition & 6 deletions app/src/controllers/organization/projects/actionCreators.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { CREATE_PROJECT, FETCH_ORGANIZATION_PROJECTS, NAVIGATE_TO_PROJECT } from './constants';
import { CREATE_PROJECT, FETCH_ORGANIZATION_PROJECTS } from './constants';

export const fetchOrganizationProjectsAction = (params) => {
return {
Expand All @@ -27,8 +27,3 @@ export const createProjectAction = (project) => ({
type: CREATE_PROJECT,
payload: project,
});

export const navigateToProjectAction = (project) => ({
type: NAVIGATE_TO_PROJECT,
payload: project,
});
2 changes: 0 additions & 2 deletions app/src/controllers/organization/projects/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ export const DEFAULT_QUERY_PARAMS = {

export const DEFAULT_SORTING = formatSortingString([DEFAULT_SORT_COLUMN], SORTING_ASC);

export const NAVIGATE_TO_PROJECT = 'navigateToProject';

export const initialPaginationState = {
size: DEFAULT_LIMITATION,
totalElements: 0,
Expand Down
2 changes: 1 addition & 1 deletion app/src/controllers/organization/projects/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

export { fetchOrganizationProjectsAction, navigateToProjectAction } from './actionCreators';
export { fetchOrganizationProjectsAction } from './actionCreators';
export { projectsReducer } from './reducer';
export { projectsPaginationSelector, projectsSelector, loadingSelector } from './selectors';
export { projectsSagas } from './sagas';
Expand Down
18 changes: 18 additions & 0 deletions app/src/pages/common/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright 2019 EPAM Systems
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

export { EmptyPageState } from './emptyPageState';
export { ConfirmationModal } from './modals/confirmationModal';
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import classNames from 'classnames/bind';
import { useIntl } from 'react-intl';
import { BubblesLoader, PlusIcon } from '@reportportal/ui-kit';
import { ScrollWrapper } from 'components/main/scrollWrapper';
import { EmptyPageState } from 'pages/common/emptyPageState';
import { EmptyPageState } from 'pages/common';
import {
organizationsListLoadingSelector,
organizationsListSelector,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { showModalAction } from 'controllers/modal';
import { createProjectAction } from 'controllers/organization/projects/actionCreators';
import { useState } from 'react';
import { COMMON_LOCALE_KEYS } from 'common/constants/localization';
import { EmptyPageState } from 'pages/common/emptyPageState';
import { EmptyPageState } from 'pages/common';
import NoResultsIcon from 'common/img/newIcons/no-results-icon-inline.svg';
import { ProjectsPageHeader } from './projectsPageHeader';
import EmptyIcon from './img/empty-projects-icon-inline.svg';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import Link from 'redux-first-router-link';
import { useDispatch, useSelector } from 'react-redux';
import { ADMIN_PROJECTS_PAGE_EVENTS } from 'components/main/analytics/events';
import { SCREEN_XS_MAX_MEDIA } from 'common/constants/screenSizeVariables';
import { navigateToProjectAction } from 'controllers/organization/projects';
import { setActiveProjectKeyAction } from 'controllers/user';
import { userAssignedSelector, PROJECT_PAGE } from 'controllers/pages';
import styles from './projectName.scss';
Expand All @@ -41,12 +40,10 @@ export const ProjectName = ({ project, disableAnalytics = false }) => {
}

dispatch(setActiveProjectKeyAction(projectKey));
dispatch(navigateToProjectAction({ project }));

if (!disableAnalytics) {
trackEvent(ADMIN_PROJECTS_PAGE_EVENTS.PROJECT_NAME);
}
event.preventDefault();
};

return (
Expand Down

0 comments on commit c81dbad

Please sign in to comment.