2017-08-22 10:53:26 +03:00
|
|
|
import Controller from '@ember/controller';
|
2017-10-30 12:38:01 +03:00
|
|
|
import {inject as service} from '@ember/service';
|
2017-08-22 10:53:26 +03:00
|
|
|
import {sort} from '@ember/object/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
|
|
|
|
2017-10-30 12:38:01 +03:00
|
|
|
session: service(),
|
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
|
|
|
});
|