(id)
| 56 | }; |
| 57 | |
| 58 | const _getProject = (id) => { |
| 59 | let { projectId } = params; |
| 60 | if (id) projectId = id; |
| 61 | |
| 62 | dispatch(getTeam(team.id)) |
| 63 | .then(() => { |
| 64 | dispatch(getTeamMembers({ team_id: team.id })); |
| 65 | dispatch(getProjects({ team_id: team.id })); |
| 66 | window.localStorage.setItem("__cb_active_team", team.id); |
| 67 | return dispatch(getProject({ project_id: projectId })); |
| 68 | }) |
| 69 | .then(() => { |
| 70 | return dispatch(changeActiveProject(projectId)); |
| 71 | }) |
| 72 | .then(() => { |
| 73 | setLoading(false); |
| 74 | }) |
| 75 | .catch(() => { |
| 76 | setLoading(false); |
| 77 | }); |
| 78 | }; |
| 79 | |
| 80 | const _canAccess = (role) => { |
| 81 | return canAccess(role, user.id, team.TeamRoles); |
no test coverage detected