Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Team Members page issues #6641

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ jobs:
- env
- run:
name: Run yarn test
no_output_timeout: 20m
command: |
cd ${CIRCLE_WORKING_DIRECTORY}/frontend/
CI=true yarn test -w 3 --silent
CI=true yarn test -w 1 --silent
CI=true GENERATE_SOURCEMAP=false yarn build

backend-code-check-PEP8:
Expand Down Expand Up @@ -133,7 +134,6 @@ jobs:
--output text)
- run:
name: Make Database Backup
no_output_timeout: 15m
command: |
aws rds wait db-instance-available \
--db-instance-identifier ${RDS_ID}
Expand Down Expand Up @@ -211,7 +211,6 @@ jobs:
/tmp/tasking-manager.cfn.json > "$tmpfile" && mv "$tmpfile" $CIRCLE_WORKING_DIRECTORY/cfn-config-<< parameters.stack_name >>.json
- run:
name: Deploy to << parameters.stack_name >>
no_output_timeout: 15m
command: |
export NODE_PATH=/usr/local/share/.config/yarn/global/node_modules/
validate-template $CIRCLE_WORKING_DIRECTORY/scripts/aws/cloudformation/tasking-manager.template.js
Expand Down
16 changes: 14 additions & 2 deletions frontend/src/views/teams.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState, useEffect } from 'react';
import { useSelector } from 'react-redux';
import { Link, useNavigate, useParams } from 'react-router-dom';
import { Link, useNavigate, useParams, useLocation } from 'react-router-dom';
import { FormattedMessage } from 'react-intl';
import { Form } from 'react-final-form';
import {
Expand Down Expand Up @@ -421,18 +421,30 @@ export function EditTeam(props) {
export function TeamDetail() {
const { id } = useParams();
useSetTitleTag(`Team #${id}`);
const location = useLocation();
const navigate = useNavigate();
const userDetails = useSelector((state) => state.auth.userDetails);
const token = useSelector((state) => state.auth.token);
const [error, loading, team] = useFetch(`teams/${id}/`);
// eslint-disable-next-line
const [projectsError, projectsLoading, projects] = useFetch(
`projects/?teamId=${id}&omitMapResults=true&projectStatuses=PUBLISHED,DRAFT,ARCHIVED`,
`projects/?teamId=${id}&omitMapResults=true&projectStatuses=PUBLISHED`,
id,
);
const [isMember, setIsMember] = useState(false);
const [managers, setManagers] = useState([]);
const [members, setMembers] = useState([]);

useEffect(() => {
if (!token) {
navigate('/login', {
state: {
from: location.pathname,
},
});
}
}, [location.pathname, navigate, token]);

useEffect(() => {
if (team && team.members) {
setManagers(filterActiveManagers(team.members));
Expand Down
Loading