summaryrefslogtreecommitdiffstats
path: root/webapp/actions
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2017-04-04 00:18:04 -0400
committerCorey Hulen <corey@hulen.com>2017-04-03 21:18:04 -0700
commit348374fba5db8415d37d5cd8b897048b1300f415 (patch)
tree8277c9be4b8032b488e2fe87ceee58a283569a3e /webapp/actions
parent4c9019b9eb789152439ad6a56e93c7f0fb7832c5 (diff)
downloadchat-348374fba5db8415d37d5cd8b897048b1300f415.tar.gz
chat-348374fba5db8415d37d5cd8b897048b1300f415.tar.bz2
chat-348374fba5db8415d37d5cd8b897048b1300f415.zip
PLT-6098 Added Manage Teams modal to System Console users list (#5914)
* Added Manage Teams modal to System Console users list * Localized ManageTeamsModal * Fixed borders between Manage Teams list items * Updated appearance of ManageTeamsModal * Fixed admin being redirected from system console when removing self from a team * Sorted teams in ManageTeamsModal * Updated Manage Teams styling
Diffstat (limited to 'webapp/actions')
-rw-r--r--webapp/actions/team_actions.jsx8
-rw-r--r--webapp/actions/websocket_actions.jsx5
2 files changed, 12 insertions, 1 deletions
diff --git a/webapp/actions/team_actions.jsx b/webapp/actions/team_actions.jsx
index 478d3dffc..4cb57961b 100644
--- a/webapp/actions/team_actions.jsx
+++ b/webapp/actions/team_actions.jsx
@@ -150,3 +150,11 @@ export function switchTeams(url) {
AsyncClient.viewChannel();
browserHistory.push(url);
}
+
+export function getTeamsForUser(userId, success, error) {
+ Client.getTeamsForUser(userId, success, error);
+}
+
+export function getTeamMembersForUser(userId, success, error) {
+ Client.getTeamMembersForUser(userId, success, error);
+}
diff --git a/webapp/actions/websocket_actions.jsx b/webapp/actions/websocket_actions.jsx
index e07e3e217..ab798df28 100644
--- a/webapp/actions/websocket_actions.jsx
+++ b/webapp/actions/websocket_actions.jsx
@@ -251,7 +251,10 @@ function handleLeaveTeamEvent(msg) {
Client.setTeamId('');
BrowserStore.removeGlobalItem('team');
BrowserStore.removeGlobalItem(msg.data.team_id);
- GlobalActions.redirectUserToDefaultTeam();
+
+ if (!global.location.pathname.startsWith('/admin_console')) {
+ GlobalActions.redirectUserToDefaultTeam();
+ }
}
} else {
UserStore.removeProfileFromTeam(msg.data.team_id, msg.data.user_id);