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