MCPcopy Index your code
hub / github.com/chartbrew/chartbrew / _getProject

Function _getProject

client/src/containers/ProjectBoard/ProjectBoard.jsx:58–78  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

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);

Callers 1

_initFunction · 0.85

Calls 5

getTeamFunction · 0.90
getTeamMembersFunction · 0.90
getProjectFunction · 0.90
changeActiveProjectFunction · 0.90
dispatchFunction · 0.50

Tested by

no test coverage detected