1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Ghost-Admin/app/controllers/team/index.js
2016-01-19 07:03:27 -06:00

33 lines
683 B
JavaScript

import Ember from 'ember';
const {
Controller,
computed,
inject: {service}
} = Ember;
const {alias, filter} = computed;
export default Controller.extend({
showInviteUserModal: false,
users: alias('model'),
session: service(),
activeUsers: filter('users', function (user) {
return /^active|warn-[1-4]|locked$/.test(user.get('status'));
}),
invitedUsers: filter('users', function (user) {
let status = user.get('status');
return status === 'invited' || status === 'invited-pending';
}),
actions: {
toggleInviteUserModal() {
this.toggleProperty('showInviteUserModal');
}
}
});