2015-02-13 07:22:32 +03:00
|
|
|
import Ember from 'ember';
|
2014-07-20 20:42:03 +04:00
|
|
|
|
2015-09-03 14:06:50 +03:00
|
|
|
export default Ember.Controller.extend({
|
2014-07-20 20:42:03 +04:00
|
|
|
|
2015-10-18 21:17:02 +03:00
|
|
|
session: Ember.inject.service(),
|
|
|
|
|
2014-07-05 12:06:10 +04:00
|
|
|
users: Ember.computed.alias('model'),
|
2014-07-02 07:44:39 +04:00
|
|
|
|
2014-07-23 10:13:20 +04:00
|
|
|
activeUsers: Ember.computed.filter('users', function (user) {
|
|
|
|
return /^active|warn-[1-4]|locked$/.test(user.get('status'));
|
|
|
|
}),
|
2014-07-02 07:44:39 +04:00
|
|
|
|
2014-07-23 10:13:20 +04:00
|
|
|
invitedUsers: Ember.computed.filter('users', function (user) {
|
|
|
|
var status = user.get('status');
|
|
|
|
|
|
|
|
return status === 'invited' || status === 'invited-pending';
|
|
|
|
})
|
2014-07-02 07:44:39 +04:00
|
|
|
});
|