2016-07-06 22:47:30 +03:00
|
|
|
import Controller from 'ember-controller';
|
|
|
|
import injectService from 'ember-service/inject';
|
2016-09-26 19:03:53 +03:00
|
|
|
import {sort} from 'ember-computed';
|
2014-07-20 20:42:03 +04:00
|
|
|
|
2015-10-28 14:36:45 +03:00
|
|
|
export default Controller.extend({
|
2015-10-18 21:17:02 +03:00
|
|
|
|
2015-11-18 13:50:48 +03:00
|
|
|
showInviteUserModal: false,
|
2014-07-02 07:44:39 +04:00
|
|
|
|
2017-03-08 21:21:35 +03:00
|
|
|
activeUsers: null,
|
|
|
|
suspendedUsers: null,
|
2016-09-26 19:03:53 +03:00
|
|
|
invites: null,
|
2015-10-28 14:36:45 +03:00
|
|
|
|
2016-07-06 22:47:30 +03:00
|
|
|
session: injectService(),
|
2015-11-18 13:50:48 +03:00
|
|
|
|
2016-09-26 19:03:53 +03:00
|
|
|
inviteOrder: ['email'],
|
|
|
|
sortedInvites: sort('invites', 'inviteOrder'),
|
2015-11-18 13:50:48 +03:00
|
|
|
|
2017-03-08 21:21:35 +03:00
|
|
|
userOrder: ['name', 'email'],
|
|
|
|
|
|
|
|
sortedActiveUsers: sort('activeUsers', 'userOrder'),
|
|
|
|
sortedSuspendedUsers: sort('suspendedUsers', 'userOrder'),
|
|
|
|
|
2015-11-18 13:50:48 +03:00
|
|
|
actions: {
|
|
|
|
toggleInviteUserModal() {
|
|
|
|
this.toggleProperty('showInviteUserModal');
|
|
|
|
}
|
|
|
|
}
|
2014-07-02 07:44:39 +04:00
|
|
|
});
|