diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-04-26 15:49:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-26 15:49:15 -0400 |
commit | 7307156c49b194c4afd946cd9e57715d45b5b21d (patch) | |
tree | 1601a0026859ff40e631b4aee9632b022ed6f40f /webapp/components/admin_console/system_users/system_users.jsx | |
parent | 1fef5bf5fe37f161959fbef5d53deccf0168cced (diff) | |
download | chat-7307156c49b194c4afd946cd9e57715d45b5b21d.tar.gz chat-7307156c49b194c4afd946cd9e57715d45b5b21d.tar.bz2 chat-7307156c49b194c4afd946cd9e57715d45b5b21d.zip |
PLT-6213 Move team store and actions over to use redux (#6222)
* Move team store and actions over to user redux
* Fix JS error when inviting by email
Diffstat (limited to 'webapp/components/admin_console/system_users/system_users.jsx')
-rw-r--r-- | webapp/components/admin_console/system_users/system_users.jsx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/webapp/components/admin_console/system_users/system_users.jsx b/webapp/components/admin_console/system_users/system_users.jsx index 7bc4b81ed..29fcd634b 100644 --- a/webapp/components/admin_console/system_users/system_users.jsx +++ b/webapp/components/admin_console/system_users/system_users.jsx @@ -16,7 +16,7 @@ import AnalyticsStore from 'stores/analytics_store.jsx'; import TeamStore from 'stores/team_store.jsx'; import UserStore from 'stores/user_store.jsx'; -import {getAllTeams, getStandardAnalytics, getTeamStats, getUser} from 'utils/async_client.jsx'; +import {getStandardAnalytics} from 'utils/async_client.jsx'; import {Constants, StatTypes, UserSearchOptions} from 'utils/constants.jsx'; import {convertTeamMapToList} from 'utils/team_utils.jsx'; import * as Utils from 'utils/utils.jsx'; @@ -33,6 +33,14 @@ const USER_ID_LENGTH = 26; const USERS_PER_PAGE = 50; export default class SystemUsers extends React.Component { + static propTypes = { + actions: React.PropTypes.shape({ + getTeams: React.PropTypes.func.isRequired, + getTeamStats: React.PropTypes.func.isRequired, + getUser: React.PropTypes.func.isRequired + }).isRequired + } + constructor(props) { super(props); @@ -76,7 +84,7 @@ export default class SystemUsers extends React.Component { UserStore.addWithoutTeamChangeListener(this.updateUsersFromStore); this.loadDataForTeam(this.state.teamId); - getAllTeams(); + this.props.actions.getTeams(0, 1000); } componentWillUpdate(nextProps, nextState) { @@ -155,7 +163,7 @@ export default class SystemUsers extends React.Component { loadProfilesWithoutTeam(0, Constants.PROFILE_CHUNK_SIZE, this.loadComplete); } else { loadProfilesAndTeamMembers(0, Constants.PROFILE_CHUNK_SIZE, teamId, this.loadComplete); - getTeamStats(teamId); + this.props.actions.getTeamStats(teamId); } } @@ -240,7 +248,7 @@ export default class SystemUsers extends React.Component { return; } - getUser( + this.props.actions.getUser( id, () => { this.setState({ |