PLT-4481 Fix member count for team user lists and channel invite list (#4422)
* Fix member count for team user lists and channel invite list * Fix client unit test
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
263f290683
Коммит
00787974d0
@@ -49,7 +49,7 @@ export default class UserList extends React.Component {
|
||||
team: AdminStore.getTeam(this.props.params.team),
|
||||
users: [],
|
||||
teamMembers: TeamStore.getMembersInTeam(this.props.params.team),
|
||||
total: stats.member_count,
|
||||
total: stats.total_member_count,
|
||||
serverError: null,
|
||||
showPasswordModal: false,
|
||||
loading: true,
|
||||
@@ -75,7 +75,7 @@ export default class UserList extends React.Component {
|
||||
team: AdminStore.getTeam(nextProps.params.team),
|
||||
users: [],
|
||||
teamMembers: TeamStore.getMembersInTeam(nextProps.params.team),
|
||||
total: stats.member_count
|
||||
total: stats.total_member_count
|
||||
});
|
||||
|
||||
this.getTeamProfiles(nextProps.params.team);
|
||||
@@ -102,7 +102,7 @@ export default class UserList extends React.Component {
|
||||
|
||||
onStatsChange() {
|
||||
const stats = TeamStore.getStats(this.props.params.team);
|
||||
this.setState({total: stats.member_count});
|
||||
this.setState({total: stats.total_member_count});
|
||||
}
|
||||
|
||||
onUsersChange() {
|
||||
|
||||
@@ -38,7 +38,7 @@ export default class ChannelInviteModal extends React.Component {
|
||||
|
||||
this.state = {
|
||||
users: null,
|
||||
total: teamStats.member_count - channelStats.member_count,
|
||||
total: teamStats.active_member_count - channelStats.member_count,
|
||||
show: true,
|
||||
search: false,
|
||||
statusChange: false
|
||||
@@ -72,8 +72,8 @@ export default class ChannelInviteModal extends React.Component {
|
||||
const teamStats = TeamStore.getCurrentStats();
|
||||
|
||||
this.setState({
|
||||
users: UserStore.getProfileListNotInChannel(this.props.channel.id),
|
||||
total: teamStats.member_count - channelStats.member_count
|
||||
users: UserStore.getProfileListNotInChannel(this.props.channel.id, true),
|
||||
total: teamStats.active_member_count - channelStats.member_count
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ export default class MemberListTeam extends React.Component {
|
||||
this.state = {
|
||||
users: UserStore.getProfileListInTeam(),
|
||||
teamMembers: Object.assign([], TeamStore.getMembersInTeam()),
|
||||
total: stats.member_count,
|
||||
total: stats.total_member_count,
|
||||
search: false,
|
||||
loading: true
|
||||
};
|
||||
@@ -67,7 +67,7 @@ export default class MemberListTeam extends React.Component {
|
||||
|
||||
onStatsChange() {
|
||||
const stats = TeamStore.getCurrentStats();
|
||||
this.setState({total: stats.member_count});
|
||||
this.setState({total: stats.total_member_count});
|
||||
}
|
||||
|
||||
nextPage(page) {
|
||||
|
||||
Ссылка в новой задаче
Block a user