mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 02:11:44 +03:00
daa0e85552
no issue
34 lines
841 B
JavaScript
34 lines
841 B
JavaScript
/* eslint-disable ghost/ember/alias-model-in-controller */
|
|
import Controller from '@ember/controller';
|
|
import {inject as service} from '@ember/service';
|
|
import {sort} from '@ember/object/computed';
|
|
|
|
export default Controller.extend({
|
|
session: service(),
|
|
|
|
showInviteUserModal: false,
|
|
|
|
activeUsers: null,
|
|
suspendedUsers: null,
|
|
invites: null,
|
|
|
|
inviteOrder: null,
|
|
userOrder: null,
|
|
|
|
init() {
|
|
this._super(...arguments);
|
|
this.inviteOrder = ['email'];
|
|
this.userOrder = ['name', 'email'];
|
|
},
|
|
|
|
sortedInvites: sort('invites', 'inviteOrder'),
|
|
sortedActiveUsers: sort('activeUsers', 'userOrder'),
|
|
sortedSuspendedUsers: sort('suspendedUsers', 'userOrder'),
|
|
|
|
actions: {
|
|
toggleInviteUserModal() {
|
|
this.toggleProperty('showInviteUserModal');
|
|
}
|
|
}
|
|
});
|