closes #964
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// @flow
|
||||
import { filter } from 'lodash';
|
||||
import { filter, orderBy } from 'lodash';
|
||||
import { computed, action, runInAction } from 'mobx';
|
||||
import invariant from 'invariant';
|
||||
import { client } from 'utils/ApiClient';
|
||||
@@ -22,6 +22,11 @@ export default class UsersStore extends BaseStore<User> {
|
||||
return filter(this.orderedData, user => user.isAdmin);
|
||||
}
|
||||
|
||||
@computed
|
||||
get orderedData(): T[] {
|
||||
return orderBy(Array.from(this.data.values()), 'name', 'asc');
|
||||
}
|
||||
|
||||
@action
|
||||
promote = (user: User) => {
|
||||
return this.actionOnUser('promote', user);
|
||||
|
||||
Reference in New Issue
Block a user